org.apache.directory.api.ldap.extras.extended.ads_impl.cancel
Class CancelFactory

java.lang.Object
  extended by org.apache.directory.api.ldap.extras.extended.ads_impl.cancel.CancelFactory
All Implemented Interfaces:
ExtendedRequestFactory<CancelRequest,CancelResponse>

public class CancelFactory
extends Object
implements ExtendedRequestFactory<CancelRequest,CancelResponse>

An ExtendedRequestFactory for creating cancel extended request response pairs.

Author:
Apache Directory Project

Constructor Summary
CancelFactory(LdapApiService codec)
           
 
Method Summary
 ExtendedRequestDecorator<CancelRequest,CancelResponse> decorate(ExtendedRequest<?> modelRequest)
          Decorates a non-decorated request.
 ExtendedResponseDecorator<CancelResponse> 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()
          
 CancelRequest newRequest(byte[] value)
          Returns a new ExtendedRequestDecorator with the following encoded value.
 CancelResponse newResponse(byte[] encodedValue)
          Creates a new ExtendedResponse, for the ExtendedRequest with a specific encoded value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CancelFactory

public CancelFactory(LdapApiService codec)
Method Detail

getOid

public String getOid()
Gets the OID of the extended requests this factory generates.

Specified by:
getOid in interface ExtendedRequestFactory<CancelRequest,CancelResponse>
Returns:
the extended request OID

newRequest

public CancelRequest newRequest()

Specified by:
newRequest in interface ExtendedRequestFactory<CancelRequest,CancelResponse>
Returns:
A new instance of the ExtendedRequestDecorator.

newResponse

public CancelResponse newResponse(byte[] encodedValue)
                           throws DecoderException
Creates a new ExtendedResponse, for the ExtendedRequest with a specific encoded value.

Specified by:
newResponse in interface ExtendedRequestFactory<CancelRequest,CancelResponse>
Parameters:
encodedValue - The encoded value for the ExtendedResponse instance.
Returns:
The new ExtendedResponse.
Throws:
DecoderException

newRequest

public CancelRequest newRequest(byte[] value)
Returns a new ExtendedRequestDecorator with the following encoded value.

Specified by:
newRequest in interface ExtendedRequestFactory<CancelRequest,CancelResponse>
Parameters:
value - the encoded value
Returns:
the decorator for the extended request type

decorate

public ExtendedRequestDecorator<CancelRequest,CancelResponse> decorate(ExtendedRequest<?> modelRequest)
Decorates a non-decorated request.

Specified by:
decorate in interface ExtendedRequestFactory<CancelRequest,CancelResponse>
Parameters:
modelRequest - the non decorated model request
Returns:
the decorated model request

decorate

public ExtendedResponseDecorator<CancelResponse> 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 interface ExtendedRequestFactory<CancelRequest,CancelResponse>
Parameters:
decoratedMessage - the message to be decorated.
Returns:
The decorated message


Copyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.