ExtendedRequest ::= [APPLICATION 23] SEQUENCE { requestName [0] LDAPOID, requestValue [1] OCTET STRING OPTIONAL }It comprises an object identifier string and an optional ASN.1 BER encoded value.
The methods in this class are used by the service provider to construct the bits to send to the LDAP server. Applications typically only deal with the classes that implement this interface, supplying them with any information required for a particular extended operation request. It would then pass such a class as an argument to the LdapContext.extendedOperation() method for performing the LDAPv3 extended operation.
For example, suppose the LDAP server supported a 'get time' extended operation. It would supply GetTimeRequest and GetTimeResponse classes:
A program would use then these classes as follows:public class GetTimeRequest implements ExtendedRequest { public GetTimeRequest() {... }; public ExtendedResponse createExtendedResponse(String id, byte[] berValue, int offset, int length) throws NamingException { return new GetTimeResponse(id, berValue, offset, length); } ... } public class GetTimeResponse implements ExtendedResponse { long time; public GetTimeResponse(String id, byte[] berValue, int offset, int length) throws NamingException { time = ... // decode berValue to get time } public java.util.Date getDate() { return new java.util.Date(time) }; public long getTime() { return time }; ... }
@author Rosanna Lee @author Scott Seligman @author Vincent Ryan @see ExtendedResponse @see LdapContext#extendedOperation @since 1.3GetTimeResponse resp = (GetTimeResponse) ectx.extendedOperation(new GetTimeRequest()); long time = resp.getTime();
4.12. Extended Operation An extension mechanism has been added in this version of LDAP, in order to allow additional operations to be defined for services not available elsewhere in this protocol, for instance digitally signed operations and results. The extended operation allows clients to make requests and receive responses with predefined syntaxes and semantics. These may be defined in RFCs or be private to particular implementations. Each request MUST have a unique OBJECT IDENTIFIER assigned to it. ExtendedRequest ::= [APPLICATION 23] SEQUENCE { requestName [0] LDAPOID, requestValue [1] OCTET STRING OPTIONAL } The requestName is a dotted-decimal representation of the OBJECT IDENTIFIER corresponding to the request. The requestValue is information in a form defined by that request, encapsulated inside an OCTET STRING.
4.12. Extended Operation An extension mechanism has been added in this version of LDAP, in order to allow additional operations to be defined for services not available elsewhere in this protocol, for instance digitally signed operations and results. The extended operation allows clients to make requests and receive responses with predefined syntaxes and semantics. These may be defined in RFCs or be private to particular implementations. Each request MUST have a unique OBJECT IDENTIFIER assigned to it. ExtendedRequest ::= [APPLICATION 23] SEQUENCE { requestName [0] LDAPOID, requestValue [1] OCTET STRING OPTIONAL } The requestName is a dotted-decimal representation of the OBJECT IDENTIFIER corresponding to the request. The requestValue is information in a form defined by that request, encapsulated inside an OCTET STRING.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|