Class EndTransactionRequestDecorator
- java.lang.Object
-
- org.apache.directory.api.ldap.codec.api.MessageDecorator<M>
-
- org.apache.directory.api.ldap.codec.decorators.RequestDecorator<M>
-
- org.apache.directory.api.ldap.codec.decorators.ResultResponseRequestDecorator<M>
-
- org.apache.directory.api.ldap.codec.decorators.SingleReplyRequestDecorator<Q>
-
- org.apache.directory.api.ldap.codec.decorators.ExtendedRequestDecorator<EndTransactionRequest>
-
- org.apache.directory.api.ldap.extras.extended.ads_impl.endTransaction.EndTransactionRequestDecorator
-
- All Implemented Interfaces:
Asn1Object
,Decorator<EndTransactionRequest>
,EndTransactionRequest
,AbandonableRequest
,ExtendedRequest
,Message
,Request
,ResultResponseRequest
,SingleReplyRequest
public class EndTransactionRequestDecorator extends ExtendedRequestDecorator<EndTransactionRequest> implements EndTransactionRequest
A Decorator for EndTransaction request.- Author:
- Apache Directory Project
-
-
Field Summary
-
Fields inherited from interface org.apache.directory.api.ldap.extras.extended.endTransaction.EndTransactionRequest
EXTENSION_OID
-
-
Constructor Summary
Constructors Constructor Description EndTransactionRequestDecorator(LdapApiService codec, EndTransactionRequest decoratedMessage)
Creates a new instance of EndTransactionRequestDecorator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
getCommit()
EndTransactionResponse
getResultResponse()
If called for the first time, this method creates a result containing response object for this request.byte[]
getTransactionId()
void
setCommit(boolean commit)
Set the Commit flag for this transaction.void
setRequestValue(byte[] requestValue)
sets the Extended request payloadvoid
setTransactionId(byte[] transactionId)
Set the transaction ID to commit or rollback-
Methods inherited from class org.apache.directory.api.ldap.codec.decorators.ExtendedRequestDecorator
addAllControls, addControl, computeLength, encode, getRequestName, getRequestValue, removeControl, setMessageId, setRequestName
-
Methods inherited from class org.apache.directory.api.ldap.codec.decorators.SingleReplyRequestDecorator
abandon, addAbandonListener, getResponseType, isAbandoned
-
Methods inherited from class org.apache.directory.api.ldap.codec.decorators.ResultResponseRequestDecorator
hasResponse
-
Methods inherited from class org.apache.directory.api.ldap.codec.api.MessageDecorator
get, getCodecService, getControl, getControls, getControlsLength, getCurrentControl, getDecorated, getDecorator, getMessageId, getMessageLength, getType, hasControl, put, setControlsLength, setMessageLength, toString
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.directory.api.ldap.model.message.ExtendedRequest
addAllControls, addControl, getRequestName, removeControl, setMessageId, setRequestName
-
Methods inherited from interface org.apache.directory.api.ldap.model.message.Message
get, getControl, getControls, getMessageId, getType, hasControl, put
-
Methods inherited from interface org.apache.directory.api.ldap.model.message.Request
hasResponse
-
Methods inherited from interface org.apache.directory.api.ldap.model.message.SingleReplyRequest
getResponseType
-
-
-
-
Constructor Detail
-
EndTransactionRequestDecorator
public EndTransactionRequestDecorator(LdapApiService codec, EndTransactionRequest decoratedMessage)
Creates a new instance of EndTransactionRequestDecorator.- Parameters:
codec
- The LDAP Service to usedecoratedMessage
- The canceled request
-
-
Method Detail
-
getResultResponse
public EndTransactionResponse getResultResponse()
If called for the first time, this method creates a result containing response object for this request.- Specified by:
getResultResponse
in interfaceResultResponseRequest
- Overrides:
getResultResponse
in classResultResponseRequestDecorator<EndTransactionRequest>
- Returns:
- a result containing response with defaults and the messageId set in response to this specific request
-
getCommit
public boolean getCommit()
- Specified by:
getCommit
in interfaceEndTransactionRequest
- Returns:
- true if the operation should be committed, false otherwise
-
setCommit
public void setCommit(boolean commit)
Set the Commit flag for this transaction.- Specified by:
setCommit
in interfaceEndTransactionRequest
- Parameters:
commit
- true if the transaction should be committed, false if it should be rollbacked.
-
getTransactionId
public byte[] getTransactionId()
- Specified by:
getTransactionId
in interfaceEndTransactionRequest
- Returns:
- The transaction ID
-
setTransactionId
public void setTransactionId(byte[] transactionId)
Set the transaction ID to commit or rollback- Specified by:
setTransactionId
in interfaceEndTransactionRequest
- Parameters:
transactionId
- The transaction ID we got from the startTransaction response
-
setRequestValue
public void setRequestValue(byte[] requestValue)
sets the Extended request payload- Overrides:
setRequestValue
in classExtendedRequestDecorator<EndTransactionRequest>
- Parameters:
requestValue
- The extended payload
-
-