Interface ExtendedOperationFactory
-
- All Known Implementing Classes:
AbstractExtendedOperationFactory,CancelFactory,CertGenerationFactory,EndTransactionFactory,GracefulDisconnectFactory,GracefulShutdownFactory,NoDFactory,PasswordModifyFactory,StartTlsFactory,StartTransactionFactory,StoredProcedureFactory,WhoAmIFactory
public interface ExtendedOperationFactoryThe factory interface, defined by the codec API, for creating new requests/responses for extended operations.- Version:
- $Rev$, $Date$
- Author:
- Apache Directory Project
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddecodeValue(ExtendedRequest extendedRequest, byte[] requestValue)Decode the value part of the extended request operation.voiddecodeValue(ExtendedResponse extendedResponse, byte[] responseValue)Decode the value part of the extended response operation.voidencodeValue(Asn1Buffer buffer, ExtendedRequest extendedRequest)Encode the value part of the extended request operation.voidencodeValue(Asn1Buffer buffer, ExtendedResponse extendedResponse)Encode the value part of the extended response operation.StringgetOid()Gets the OID of the extended requests this factory generates.ExtendedRequestnewRequest()Returns a newExtendedRequestwith no valueExtendedRequestnewRequest(byte[] value)Returns a newExtendedRequestwith the following encoded value.ExtendedResponsenewResponse()Creates a new ExtendedResponse, for the ExtendedRequest with no valueExtendedResponsenewResponse(byte[] encodedValue)Creates a new ExtendedResponse, for the ExtendedRequest with a specific encoded value.
-
-
-
Method Detail
-
getOid
String getOid()
Gets the OID of the extended requests this factory generates.- Returns:
- the extended request OID
-
newRequest
ExtendedRequest newRequest()
Returns a newExtendedRequestwith no value- Returns:
- the decorator for the extended request type
-
newRequest
ExtendedRequest newRequest(byte[] value) throws DecoderException
Returns a newExtendedRequestwith the following encoded value.- Parameters:
value- the encoded value- Returns:
- the decorator for the extended request type
- Throws:
DecoderException- If we can't decode the response
-
newResponse
ExtendedResponse newResponse() throws DecoderException
Creates a new ExtendedResponse, for the ExtendedRequest with no value- Returns:
- The new ExtendedResponse.
- Throws:
DecoderException- If the response cannot be decoded
-
newResponse
ExtendedResponse newResponse(byte[] encodedValue) throws DecoderException
Creates a new ExtendedResponse, for the ExtendedRequest with a specific encoded value.- Parameters:
encodedValue- The encoded value for the ExtendedResponse instance.- Returns:
- The new ExtendedResponse.
- Throws:
DecoderException- If we can't decode the response
-
encodeValue
void encodeValue(Asn1Buffer buffer, ExtendedRequest extendedRequest)
Encode the value part of the extended request operation.- Parameters:
buffer- The buffer into which to put the encoded valueextendedRequest- The ExtendedRequest Operation to encode
-
decodeValue
void decodeValue(ExtendedRequest extendedRequest, byte[] requestValue) throws DecoderException
Decode the value part of the extended request operation.- Parameters:
extendedRequest- The ExtendedRequest Operation to feedrequestValue- The request value to decode- Throws:
DecoderException- If the value cannot be decoded
-
encodeValue
void encodeValue(Asn1Buffer buffer, ExtendedResponse extendedResponse)
Encode the value part of the extended response operation.- Parameters:
buffer- The buffer into which to put the encoded valueextendedResponse- The ExtendedResponse Operation to encode
-
decodeValue
void decodeValue(ExtendedResponse extendedResponse, byte[] responseValue) throws DecoderException
Decode the value part of the extended response operation.- Parameters:
extendedResponse- The ExtendedResponse Operation to feedresponseValue- The response value to decode- Throws:
DecoderException- If the value cannot be decoded
-
-