Package com.mongodb.client
Class MongoClientFactory
- java.lang.Object
-
- com.mongodb.client.MongoClientFactory
-
- All Implemented Interfaces:
javax.naming.spi.ObjectFactory
@Deprecated(since="2021-05-27") public class MongoClientFactory extends java.lang.Object implements javax.naming.spi.ObjectFactoryDeprecated.Usage of this API is not supported in AEM as a Cloud Service.A JNDI ObjectFactory forMongoClientinstances.- Since:
- 3.10
-
-
Constructor Summary
Constructors Constructor Description MongoClientFactory()Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.lang.ObjectgetObjectInstance(java.lang.Object obj, javax.naming.Name name, javax.naming.Context nameCtx, java.util.Hashtable<?,?> environment)Deprecated.This implementation will create instances ofMongoClientbased on a connection string conforming to the format specified inConnectionString.
-
-
-
Method Detail
-
getObjectInstance
public java.lang.Object getObjectInstance(java.lang.Object obj, javax.naming.Name name, javax.naming.Context nameCtx, java.util.Hashtable<?,?> environment)Deprecated.This implementation will create instances ofMongoClientbased on a connection string conforming to the format specified inConnectionString.The connection string is specified in one of two ways:
- As the
Stringvalue of a property in theenvironmentparameter with a key of"connectionString" - As the
Stringvalue of aRefAddrwith type"connectionString"in anobjparameter of typeReference
environmentparameter takes precedence over specification in theobjparameter. ThenameandnameCtxparameters are ignored. If a non-empty connection string is not specified in either of these two ways, aMongoExceptionis thrown.- Specified by:
getObjectInstancein interfacejavax.naming.spi.ObjectFactory- Returns:
- an instance of
MongoClientbased on the specified connection string
- As the
-
-