Class StartTransactionFactory
- java.lang.Object
-
- org.apache.directory.api.ldap.extras.extended.ads_impl.startTransaction.StartTransactionFactory
-
- All Implemented Interfaces:
ExtendedOperationFactory
public class StartTransactionFactory extends Object implements ExtendedOperationFactory
AnExtendedOperationFactory
for creating StartTransaction extended request response pairs.- Author:
- Apache Directory Project
-
-
Constructor Summary
Constructors Constructor Description StartTransactionFactory(LdapApiService codec)
Creates a new instance of StartTransactionFactory.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StartTransactionRequestDecorator
decorate(ExtendedRequest modelRequest)
Decorates a non-decorated request.StartTransactionResponseDecorator
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.StartTransactionRequest
newRequest(byte[] value)
Returns a newExtendedRequestDecorator
with the following encoded value.StartTransactionResponse
newResponse(byte[] encodedValue)
Creates a new ExtendedResponse, for the ExtendedRequest with a specific encoded value.
-
-
-
Constructor Detail
-
StartTransactionFactory
public StartTransactionFactory(LdapApiService codec)
Creates a new instance of StartTransactionFactory.- 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 StartTransactionResponse 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 StartTransactionRequest 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 StartTransactionRequestDecorator 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 StartTransactionResponseDecorator 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
-
-