Class MongoClientFactory

java.lang.Object
org.ikasan.component.endpoint.mongo.MongoClientFactory

public class MongoClientFactory extends Object
Factory for creating MongoClients, useful when creating and injecting objects through Spring
  • Method Details

    • getMongoClient

      public static com.mongodb.MongoClient getMongoClient(MongoClientConfiguration configuration)
      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