Class JNDIExtendedRequest

java.lang.Object
com.unboundid.ldap.sdk.migrate.jndi.JNDIExtendedRequest
All Implemented Interfaces:
Serializable, ExtendedRequest

This class provides a mechanism for converting between an LDAP extended request as used in JNDI and one used in the UnboundID LDAP SDK for Java.
See Also:
  • Constructor Details

    • JNDIExtendedRequest

      Creates a new JNDI extended request from the provided SDK extended request.
      Parameters:
      r - The SDK extended request to use to create this JNDI extended request.
    • JNDIExtendedRequest

      Creates a new JNDI extended request from the provided JNDI extended request.
      Parameters:
      r - The JNDI extended request to use to create this JNDI extended request.
      Throws:
      NamingException - If a problem occurs while trying to create this JNDI extended request.
  • Method Details

    • getID

      @NotNull public String getID()
      Retrieves the object identifier for this extended request.
      Specified by:
      getID in interface ExtendedRequest
      Returns:
      The object identifier for this extended request.
    • getEncodedValue

      @Nullable public byte[] getEncodedValue()
      Retrieves the encoded value for this extended request (including the BER type and length), if available.
      Specified by:
      getEncodedValue in interface ExtendedRequest
      Returns:
      The encoded value for this extended request, or null if there is no value.
    • createExtendedResponse

      @NotNull public JNDIExtendedResponse createExtendedResponse(@Nullable String id, @Nullable byte[] berValue, int offset, int length) throws NamingException
      Creates a JNDI extended response with the provided information.
      Specified by:
      createExtendedResponse in interface ExtendedRequest
      Parameters:
      id - The object identifier for the response, or null if there should not be a value.
      berValue - A byte array containing the encoded value (including BER type and length), or null if the response should not have a value.
      offset - The offset within the provided array at which the value should begin.
      length - The number of bytes contained in the value.
      Returns:
      The created JNDI extended response.
      Throws:
      NamingException - If a problem occurs while creating the response.
    • toSDKExtendedRequest

      Retrieves an LDAP SDK extended request that is the equivalent of this JNDI extended request.
      Returns:
      An LDAP SDK extended request that is the equivalent of this JNDI extended request.
    • toSDKExtendedRequest

      Retrieves an LDAP SDK extended request that is the equivalent of the provided JNDI extended request.
      Parameters:
      r - The JNDI extended request to convert to an LDAP SDK extended request.
      Returns:
      The LDAP SDK extended request converted from the provided JNDI extended request.
      Throws:
      NamingException - If a problem occurs while decoding the provided JNDI extended request as an SDK extended request.
    • toString

      Retrieves a string representation of this JNDI extended request.
      Overrides:
      toString in class Object
      Returns:
      A string representation of this JNDI request.