Class MongoClientFactory
java.lang.Object
org.ikasan.component.endpoint.mongo.MongoClientFactory
Factory for creating MongoClients, useful when creating and injecting objects through Spring
-
Method Summary
Modifier and TypeMethodDescriptionstatic com.mongodb.MongoClientgetMongoClient(MongoClientConfiguration configuration) Creates and returns a MongoClient based on a configuration.
-
Method Details
-
getMongoClient
Creates and returns a MongoClient based on a configuration. Callers of this method are responsible for the lifecycle management of the returned MongoClient, for example, calling close() when it is no longer required- Parameters:
configuration- the configuration- Returns:
- a MongoClient
-