org.apache.directory.api.ldap.extras.extended.ads_impl.certGeneration
Class CertGenerationFactory

java.lang.Object
  extended by org.apache.directory.api.ldap.extras.extended.ads_impl.certGeneration.CertGenerationFactory
All Implemented Interfaces:
ExtendedRequestFactory<CertGenerationRequest,CertGenerationResponse>

public class CertGenerationFactory
extends Object
implements ExtendedRequestFactory<CertGenerationRequest,CertGenerationResponse>

An ExtendedRequestFactory for creating cancel extended request response pairs.

Author:
Apache Directory Project

Constructor Summary
CertGenerationFactory(LdapApiService codec)
           
 
Method Summary
 ExtendedRequestDecorator<CertGenerationRequest,CertGenerationResponse> decorate(ExtendedRequest<?> modelRequest)
          Decorates a non-decorated request.
 ExtendedResponseDecorator<CertGenerationResponse> 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.
 CertGenerationRequest newRequest()
          
 CertGenerationRequest newRequest(byte[] value)
          Returns a new ExtendedRequestDecorator with the following encoded value.
 CertGenerationResponse 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

CertGenerationFactory

public CertGenerationFactory(LdapApiService codec)
Method Detail

getOid

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

Specified by:
getOid in interface ExtendedRequestFactory<CertGenerationRequest,CertGenerationResponse>
Returns:
the extended request OID

newRequest

public CertGenerationRequest newRequest()

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

newResponse

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

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

newRequest

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

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

decorate

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

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

decorate

public ExtendedResponseDecorator<CertGenerationResponse> 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<CertGenerationRequest,CertGenerationResponse>
Parameters:
decoratedMessage - the message to be decorated.
Returns:
The decorated message


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