Class CancelFactory
- java.lang.Object
-
- org.apache.directory.api.ldap.extras.extended.ads_impl.cancel.CancelFactory
-
- All Implemented Interfaces:
ExtendedOperationFactory
public class CancelFactory extends Object implements ExtendedOperationFactory
AnExtendedOperationFactory
for creating cancel extended request response pairs.- Author:
- Apache Directory Project
-
-
Constructor Summary
Constructors Constructor Description CancelFactory(LdapApiService codec)
Creates a new instance of CancelFactory.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CancelRequestDecorator
decorate(ExtendedRequest modelRequest)
Decorates a non-decorated request.CancelResponseDecorator
decorate(ExtendedResponse decoratedMessage)
Decorates an ExtendedResponse which may or may not be of the expected type.String
getOid()
Gets the OID of the extended requests this factory generates.CancelRequest
newRequest(byte[] value)
Returns a newExtendedRequestDecorator
with the following encoded value.CancelResponse
newResponse(byte[] encodedValue)
Creates a new ExtendedResponse, for the ExtendedRequest with a specific encoded value.
-
-
-
Constructor Detail
-
CancelFactory
public CancelFactory(LdapApiService codec)
Creates a new instance of CancelFactory.- Parameters:
codec
- The codec for this factory.
-
-
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
-
newResponse
public CancelResponse newResponse(byte[] encodedValue) throws DecoderException
Creates a new ExtendedResponse, for the ExtendedRequest with a specific encoded value.- Specified by:
newResponse
in interfaceExtendedOperationFactory
- Parameters:
encodedValue
- The encoded value for the ExtendedResponse instance.- Returns:
- The new ExtendedResponse.
- Throws:
DecoderException
- If we can't decode the response
-
newRequest
public CancelRequest newRequest(byte[] value)
Returns a newExtendedRequestDecorator
with the following encoded value.- Specified by:
newRequest
in interfaceExtendedOperationFactory
- Parameters:
value
- the encoded value- Returns:
- the decorator for the extended request type
-
decorate
public CancelRequestDecorator decorate(ExtendedRequest modelRequest)
Decorates a non-decorated request.- Specified by:
decorate
in interfaceExtendedOperationFactory
- Parameters:
modelRequest
- the non decorated model request- Returns:
- the decorated model request
-
decorate
public CancelResponseDecorator decorate(ExtendedResponse decoratedMessage)
Decorates an ExtendedResponse which may or may not be of the expected type. The factory implementor must check and handle appropriately.- Specified by:
decorate
in interfaceExtendedOperationFactory
- Parameters:
decoratedMessage
- the message to be decorated.- Returns:
- The decorated message
-
-