Class JNDIExtendedRequest
java.lang.Object
com.unboundid.ldap.sdk.migrate.jndi.JNDIExtendedRequest
- All Implemented Interfaces:
Serializable,ExtendedRequest
@NotMutable
@ThreadSafety(level=COMPLETELY_THREADSAFE)
public final class JNDIExtendedRequest
extends Object
implements 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 Summary
ConstructorsConstructorDescriptionCreates a new JNDI extended request from the provided SDK extended request.Creates a new JNDI extended request from the provided JNDI extended request. -
Method Summary
Modifier and TypeMethodDescriptioncreateExtendedResponse(String id, byte[] berValue, int offset, int length) Creates a JNDI extended response with the provided information.byte[]Retrieves the encoded value for this extended request (including the BER type and length), if available.getID()Retrieves the object identifier for this extended request.Retrieves an LDAP SDK extended request that is the equivalent of this JNDI extended request.static ExtendedRequestRetrieves an LDAP SDK extended request that is the equivalent of the provided JNDI extended request.toString()Retrieves a string representation of this JNDI extended request.
-
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
Retrieves the object identifier for this extended request.- Specified by:
getIDin interfaceExtendedRequest- Returns:
- The object identifier for this extended request.
-
getEncodedValue
Retrieves the encoded value for this extended request (including the BER type and length), if available.- Specified by:
getEncodedValuein interfaceExtendedRequest- Returns:
- The encoded value for this extended request, or
nullif 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:
createExtendedResponsein interfaceExtendedRequest- Parameters:
id- The object identifier for the response, ornullif there should not be a value.berValue- A byte array containing the encoded value (including BER type and length), ornullif 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
@Nullable public static ExtendedRequest toSDKExtendedRequest(@Nullable ExtendedRequest r) throws NamingException 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.
-