Class JNDIExtendedResponse
- java.lang.Object
-
- com.unboundid.ldap.sdk.migrate.jndi.JNDIExtendedResponse
-
- All Implemented Interfaces:
java.io.Serializable,javax.naming.ldap.ExtendedResponse
@NotMutable @ThreadSafety(level=COMPLETELY_THREADSAFE) public final class JNDIExtendedResponse extends java.lang.Object implements javax.naming.ldap.ExtendedResponse
This class provides a mechanism for converting between an LDAP extended response as used in JNDI and one used in the UnboundID LDAP SDK for Java.- See Also:
ExtendedResult, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description JNDIExtendedResponse(ExtendedResult r)Creates a new JNDI extended response from the provided SDK extended result.JNDIExtendedResponse(javax.naming.ldap.ExtendedResponse r)Creates a new JNDI extended response from the provided JNDI extended response.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]getEncodedValue()Retrieves the encoded value for this extended response (including the BER type and length), if available.java.lang.StringgetID()Retrieves the object identifier for this extended response, if available.ExtendedResulttoSDKExtendedResult()Retrieves an LDAP SDK extended result that is the equivalent of this JNDI extended response.static ExtendedResulttoSDKExtendedResult(javax.naming.ldap.ExtendedResponse r)Retrieves an LDAP SDK extended result that is the equivalent of the provided JNDI extended response.java.lang.StringtoString()Retrieves a string representation of this JNDI extended response.
-
-
-
Constructor Detail
-
JNDIExtendedResponse
public JNDIExtendedResponse(@NotNull ExtendedResult r)
Creates a new JNDI extended response from the provided SDK extended result.- Parameters:
r- The SDK extended result to use to create this JNDI extended response.
-
JNDIExtendedResponse
public JNDIExtendedResponse(@NotNull javax.naming.ldap.ExtendedResponse r) throws javax.naming.NamingException
Creates a new JNDI extended response from the provided JNDI extended response.- Parameters:
r- The JNDI extended response to use to create this JNDI extended response.- Throws:
javax.naming.NamingException- If a problem occurs while trying to create this JNDI extended response.
-
-
Method Detail
-
getID
@Nullable public java.lang.String getID()
Retrieves the object identifier for this extended response, if available.- Specified by:
getIDin interfacejavax.naming.ldap.ExtendedResponse- Returns:
- The object identifier for this extended response, or
nullif there is no OID.
-
getEncodedValue
@Nullable public byte[] getEncodedValue()
Retrieves the encoded value for this extended response (including the BER type and length), if available.- Specified by:
getEncodedValuein interfacejavax.naming.ldap.ExtendedResponse- Returns:
- The encoded value for this extended response, or
nullif there is no value.
-
toSDKExtendedResult
@NotNull public ExtendedResult toSDKExtendedResult()
Retrieves an LDAP SDK extended result that is the equivalent of this JNDI extended response.- Returns:
- An LDAP SDK extended result that is the equivalent of this JNDI extended response.
-
toSDKExtendedResult
@Nullable public static ExtendedResult toSDKExtendedResult(@Nullable javax.naming.ldap.ExtendedResponse r) throws javax.naming.NamingException
Retrieves an LDAP SDK extended result that is the equivalent of the provided JNDI extended response.- Parameters:
r- The JNDI extended response to convert to an LDAP SDK extended result.- Returns:
- The LDAP SDK extended result converted from the provided JNDI extended response.
- Throws:
javax.naming.NamingException- If a problem occurs while decoding the provided JNDI extended response as an SDK extended result.
-
-