public class MongoDatabaseURIHandlerImpl
extends URIHandlerImpl
| Constructor and Description |
|---|
MongoDatabaseURIHandlerImpl(MongoDatabaseProvider mongoDatabaseProvider,
InputStreamFactory inputStreamFactory,
OutputStreamFactory outputStreamFactory) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canHandle(URI uri) |
java.io.InputStream |
createInputStream(URI uri,
java.util.Map<?,?> options) |
java.io.OutputStream |
createOutputStream(URI uri,
java.util.Map<?,?> options) |
void |
delete(URI uri,
java.util.Map<?,?> options) |
boolean |
exists(URI uri,
java.util.Map<?,?> options) |
java.lang.String |
getDatabaseURI()
Return the database uri
|
protected <any> |
getMongoCollection(MongoDatabase database,
URI uri,
java.util.Map<?,?> options)
Returns the
MongoCollection. |
public MongoDatabaseURIHandlerImpl(MongoDatabaseProvider mongoDatabaseProvider,
InputStreamFactory inputStreamFactory,
OutputStreamFactory outputStreamFactory)
databaseLocator - an instance of the mongo locator serviceinputStreamFactory - an instance of the input stream factory serviceoutputStreamFactory - an instance of the output stream factory servicepublic boolean canHandle(URI uri)
public java.io.OutputStream createOutputStream(URI uri,
java.util.Map<?,?> options)
throws java.io.IOException
java.io.IOExceptionpublic java.io.InputStream createInputStream(URI uri,
java.util.Map<?,?> options)
throws java.io.IOException
java.io.IOExceptionpublic void delete(URI uri,
java.util.Map<?,?> options)
throws java.io.IOException
java.io.IOExceptionpublic boolean exists(URI uri,
java.util.Map<?,?> options)
public java.lang.String getDatabaseURI()
protected <any> getMongoCollection(MongoDatabase database,
URI uri,
java.util.Map<?,?> options)
MongoCollection. Clients may extend this.
The default extracts the collection name from the URI and appends the value from the
Options#OPTIONS_COLLECTION_PARTITION_EXTENSION, if it setdatabase - The MongoDatabaseuri - the resource URIoptions - the options mapMongoCollectionBryan Hunt, Data In Motion Consulting