public class MongoDBComponent extends DefaultComponent implements MongoDBConnectionService
MongoClient directly, because it's this
component which is responsible for creating and closing it.| Modifier and Type | Class and Description |
|---|---|
protected static class |
MongoDBComponent.MongoDBConnectionConfigRegistry |
| Modifier and Type | Field and Description |
|---|---|
static String |
NAME |
lastModified| Constructor and Description |
|---|
MongoDBComponent() |
| Modifier and Type | Method and Description |
|---|---|
int |
getApplicationStartedOrder()
The component notification order for
Component.applicationStarted(org.nuxeo.runtime.model.ComponentContext). |
com.mongodb.client.MongoDatabase |
getDatabase(String id) |
Iterable<com.mongodb.client.MongoDatabase> |
getDatabases() |
void |
registerContribution(Object contribution,
String extensionPoint,
ComponentInstance contributor) |
void |
start(ComponentContext context)
Start the component.
|
void |
stop(ComponentContext context)
Stop the component.
|
void |
unregisterContribution(Object contribution,
String extensionPoint,
ComponentInstance contributor) |
activate, deactivate, getAdapter, getLastModified, registerExtension, setLastModified, setModifiedNow, unregisterExtensionclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitapplicationStartedpublic static final String NAME
public MongoDBComponent()
public void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
registerContribution in class DefaultComponentpublic void unregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
unregisterContribution in class DefaultComponentpublic void start(ComponentContext context)
Componentstart in interface Componentstart in class DefaultComponentpublic void stop(ComponentContext context)
Componentstop in interface Componentstop in class DefaultComponentpublic int getApplicationStartedOrder()
ComponentComponent.applicationStarted(org.nuxeo.runtime.model.ComponentContext).
Components are notified in increasing order. Order 1000 is the default order for components that don't care. Order 100 is the repository initialization.
getApplicationStartedOrder in interface Componentpublic com.mongodb.client.MongoDatabase getDatabase(String id)
getDatabase in interface MongoDBConnectionServiceid - the connection id to retrieve.MongoDBConnectionConfig for the input id, or the default one if it
doesn't existpublic Iterable<com.mongodb.client.MongoDatabase> getDatabases()
getDatabases in interface MongoDBConnectionServiceCopyright © 2018 Nuxeo. All rights reserved.