Class Connections
- java.lang.Object
 - 
- org.forgerock.opendj.ldap.Connections
 
 
- 
public final class Connections extends Object
This class contains methods for creating and manipulating LDAP clients and connections. 
- 
- 
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ConnectionnewInternalConnection(io.reactivex.rxjava3.functions.BiFunction<Integer,Request,io.reactivex.rxjava3.core.Flowable<Response>> requestHandler)Creates a newConnectionwhich will route requests to the providedrequestHandler.static ConnectionFactorynewInternalConnectionFactory(io.reactivex.rxjava3.functions.BiFunction<Integer,Request,io.reactivex.rxjava3.core.Flowable<Response>> requestHandler)Creates a newConnectionFactorywhich will route requests to the providedrequestHandler.static Connectionuncloseable(Connection connection)Returns an uncloseable view of the provided connection.static ConnectionFactoryuncloseable(ConnectionFactory factory)Returns an uncloseable view of the provided connection factory. 
 - 
 
- 
- 
Method Detail
- 
newInternalConnection
public static Connection newInternalConnection(io.reactivex.rxjava3.functions.BiFunction<Integer,Request,io.reactivex.rxjava3.core.Flowable<Response>> requestHandler)
Creates a newConnectionwhich will route requests to the providedrequestHandler.When processing requests,
requestHandlerimplementations are passed a pseudo request ID which is incremented for each successive internal request on a per client connection basis. The request ID may be useful for logging purposes.An internal connection does not require
requestHandlerimplementations to return a result when processing requests. However, it is recommended that implementations do always return results even for abandoned requests. This is because application client threads may block indefinitely waiting for results.- Parameters:
 requestHandler- The request handler which will be used for all client connections.- Returns:
 - The new internal connection.
 - Throws:
 NullPointerException- IfrequestHandlerwasnull.
 
- 
newInternalConnectionFactory
public static ConnectionFactory newInternalConnectionFactory(io.reactivex.rxjava3.functions.BiFunction<Integer,Request,io.reactivex.rxjava3.core.Flowable<Response>> requestHandler)
Creates a newConnectionFactorywhich will route requests to the providedrequestHandler.When processing requests,
requestHandlerimplementations are passed a pseudo request ID which is incremented for each successive internal request on a per client connection basis. The request ID may be useful for logging purposes.An internal connection does not require
requestHandlerimplementations to return a result when processing requests. However, it is recommended that implementations do always return results even for abandoned requests. This is because application client threads may block indefinitely waiting for results.- Parameters:
 requestHandler- The request handler which will be used for all client connections.- Returns:
 - The new internal LDAP client.
 - Throws:
 NullPointerException- IfrequestHandlerwasnull.
 
- 
uncloseable
public static Connection uncloseable(Connection connection)
Returns an uncloseable view of the provided connection. Attempts to callConnection.close()orConnection.close(UnbindRequest, String)will be ignored.- Parameters:
 connection- The connection whoseclosemethods are to be disabled.- Returns:
 - An uncloseable view of the provided connection.
 
 
- 
uncloseable
public static ConnectionFactory uncloseable(ConnectionFactory factory)
Returns an uncloseable view of the provided connection factory. Attempts to callConnectionFactory.close()will be ignored.- Parameters:
 factory- The connection factory whoseclosemethod is to be disabled.- Returns:
 - An uncloseable view of the provided connection factory.
 
 
 - 
 
 -