Class MongoClientFactory

  • All Implemented Interfaces:
    javax.naming.spi.ObjectFactory

    @Deprecated(since="2021-05-27")
    public class MongoClientFactory
    extends java.lang.Object
    implements javax.naming.spi.ObjectFactory
    Deprecated.
    Usage of this API is not supported in AEM as a Cloud Service.
    A JNDI ObjectFactory for MongoClient instances.
    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.Object getObjectInstance​(java.lang.Object obj, javax.naming.Name name, javax.naming.Context nameCtx, java.util.Hashtable<?,​?> environment)
      Deprecated.
      This implementation will create instances of MongoClient based on a connection string conforming to the format specified in ConnectionString.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MongoClientFactory

        public MongoClientFactory()
        Deprecated.
    • 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 of MongoClient based on a connection string conforming to the format specified in ConnectionString.

        The connection string is specified in one of two ways:

        • As the String value of a property in the environment parameter with a key of "connectionString"
        • As the String value of a RefAddr with type "connectionString" in an obj parameter of type Reference
        Specification of the connection string in the environment parameter takes precedence over specification in the obj parameter. The name and nameCtx parameters are ignored. If a non-empty connection string is not specified in either of these two ways, a MongoException is thrown.
        Specified by:
        getObjectInstance in interface javax.naming.spi.ObjectFactory
        Returns:
        an instance of MongoClient based on the specified connection string