Class AuthenticatedConnectionContext

java.lang.Object
org.forgerock.services.context.AbstractContext
org.forgerock.opendj.rest2ldap.AuthenticatedConnectionContext
All Implemented Interfaces:
org.forgerock.services.context.Context

public final class AuthenticatedConnectionContext extends org.forgerock.services.context.AbstractContext
A Context containing a cached pre-authenticated LDAP connection which should be re-used for performing subsequent LDAP operations. The LDAP connection is typically acquired while perform authentication in an HTTP servlet filter. It is the responsibility of the component which acquired the connection to release once processing has completed.
  • Field Summary

    Fields inherited from class org.forgerock.services.context.AbstractContext

    data
  • Constructor Summary

    Constructors
    Constructor
    Description
    AuthenticatedConnectionContext(org.forgerock.services.context.Context parent, org.forgerock.opendj.ldap.Connection connection)
    Creates a new pre-authenticated cached LDAP connection context having the provided parent and an ID automatically generated using UUID.randomUUID().
  • Method Summary

    Modifier and Type
    Method
    Description
    org.forgerock.opendj.ldap.Connection
    Returns the cached pre-authenticated LDAP connection which should be re-used for subsequent LDAP operations.

    Methods inherited from class org.forgerock.services.context.AbstractContext

    asContext, containsContext, containsContext, getContext, getContextName, getId, getParent, isRootContext, toJsonValue, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • AuthenticatedConnectionContext

      public AuthenticatedConnectionContext(org.forgerock.services.context.Context parent, org.forgerock.opendj.ldap.Connection connection)
      Creates a new pre-authenticated cached LDAP connection context having the provided parent and an ID automatically generated using UUID.randomUUID().
      Parameters:
      parent - The parent context.
      connection - The cached pre-authenticated LDAP connection which should be re-used for subsequent LDAP operations.
  • Method Details

    • getConnection

      public org.forgerock.opendj.ldap.Connection getConnection()
      Returns the cached pre-authenticated LDAP connection which should be re-used for subsequent LDAP operations.
      Returns:
      The cached pre-authenticated LDAP connection which should be re-used for subsequent LDAP operations.