Class AbstractExtendedOperationFactory
- java.lang.Object
-
- org.apache.directory.api.ldap.codec.api.AbstractExtendedOperationFactory
-
- All Implemented Interfaces:
ExtendedOperationFactory
- Direct Known Subclasses:
CancelFactory
,CertGenerationFactory
,EndTransactionFactory
,GracefulDisconnectFactory
,GracefulShutdownFactory
,NoDFactory
,PasswordModifyFactory
,StartTlsFactory
,StartTransactionFactory
,StoredProcedureFactory
,WhoAmIFactory
public abstract class AbstractExtendedOperationFactory extends Object implements ExtendedOperationFactory
A Factory to encode Extended Request and Response messages- Author:
- Apache Directory Project
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
decodeValue(ExtendedRequest extendedRequest, byte[] requestValue)
Decode the value part of the extended request operation.void
decodeValue(ExtendedResponse extendedResponse, byte[] responseValue)
Decode the value part of the extended response operation.void
encodeValue(Asn1Buffer buffer, ExtendedRequest extendedRequest)
Encode the value part of the extended request operation.void
encodeValue(Asn1Buffer buffer, ExtendedResponse extendedResponse)
Encode the value part of the extended response operation.String
getOid()
Gets the OID of the extended requests this factory generates.ExtendedRequest
newRequest(byte[] value)
Returns a newExtendedRequest
with the following encoded value.ExtendedResponse
newResponse(byte[] value)
Creates a new ExtendedResponse, for the ExtendedRequest with a specific encoded value.-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.directory.api.ldap.codec.api.ExtendedOperationFactory
newRequest, newResponse
-
-
-
-
Method Detail
-
getOid
public String getOid()
Gets the OID of the extended requests this factory generates.- Specified by:
getOid
in interfaceExtendedOperationFactory
- Returns:
- the extended request OID
-
newRequest
public ExtendedRequest newRequest(byte[] value) throws DecoderException
Returns a newExtendedRequest
with the following encoded value.- Specified by:
newRequest
in interfaceExtendedOperationFactory
- Parameters:
value
- the encoded value- Returns:
- the decorator for the extended request type
- Throws:
DecoderException
- If we can't decode the response
-
newResponse
public ExtendedResponse newResponse(byte[] value) throws DecoderException
Creates a new ExtendedResponse, for the ExtendedRequest with a specific encoded value.- Specified by:
newResponse
in interfaceExtendedOperationFactory
- Parameters:
value
- The encoded value for the ExtendedResponse instance.- Returns:
- The new ExtendedResponse.
- Throws:
DecoderException
- If we can't decode the response
-
encodeValue
public void encodeValue(Asn1Buffer buffer, ExtendedRequest extendedRequest)
Encode the value part of the extended request operation.- Specified by:
encodeValue
in interfaceExtendedOperationFactory
- Parameters:
buffer
- The buffer into which to put the encoded valueextendedRequest
- The ExtendedRequest Operation to encode
-
decodeValue
public void decodeValue(ExtendedRequest extendedRequest, byte[] requestValue) throws DecoderException
Decode the value part of the extended request operation.- Specified by:
decodeValue
in interfaceExtendedOperationFactory
- Parameters:
extendedRequest
- The ExtendedRequest Operation to feedrequestValue
- The request value to decode- Throws:
DecoderException
- If the value cannot be decoded
-
encodeValue
public void encodeValue(Asn1Buffer buffer, ExtendedResponse extendedResponse)
Encode the value part of the extended response operation.- Specified by:
encodeValue
in interfaceExtendedOperationFactory
- Parameters:
buffer
- The buffer into which to put the encoded valueextendedResponse
- The ExtendedResponse Operation to encode
-
decodeValue
public void decodeValue(ExtendedResponse extendedResponse, byte[] responseValue) throws DecoderException
Decode the value part of the extended response operation.- Specified by:
decodeValue
in interfaceExtendedOperationFactory
- Parameters:
extendedResponse
- The ExtendedResponse Operation to feedresponseValue
- The response value to decode- Throws:
DecoderException
- If the value cannot be decoded
-
-