Class EndTransactionRequestImpl
- java.lang.Object
-
- org.apache.directory.api.ldap.model.message.AbstractMessage
-
- org.apache.directory.api.ldap.model.message.AbstractRequest
-
- org.apache.directory.api.ldap.model.message.AbstractExtendedRequest
-
- org.apache.directory.api.ldap.model.message.OpaqueExtendedRequest
-
- org.apache.directory.api.ldap.extras.extended.endTransaction.EndTransactionRequestImpl
-
- All Implemented Interfaces:
EndTransactionRequest
,ExtendedRequest
,Message
,Request
,ResultResponseRequest
,SingleReplyRequest
public class EndTransactionRequestImpl extends OpaqueExtendedRequest implements EndTransactionRequest
The EndTransactionRequest implementation. This is for the RFC 5805 End Transaction Request, which grammar is :ExtendedRequest ::= [APPLICATION 23] SEQUENCE { requestName [0] LDAPOID, requestValue [1] OCTET STRING OPTIONAL }
where 'requestName' is 1.3.6.1.1.21.3 and requestValue is a BER encoded value. The syntax for this value is :txnEndReq ::= SEQUENCE { commit BOOLEAN DEFAULT TRUE, identifier OCTET STRING }
- 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 EndTransactionRequestImpl()
Creates a new instance of EndTransactionRequestImpl.EndTransactionRequestImpl(int messageId)
Creates a new instance of EndTransactionRequestImpl.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
getCommit()
EndTransactionResponse
getResultResponse()
The result containing response for this request.byte[]
getTransactionId()
void
setCommit(boolean commit)
Set the Commit flag for this transaction.void
setTransactionId(byte[] transactionId)
Set the transaction ID to commit or rollbackString
toString()
Get a String representation of an Extended Request-
Methods inherited from class org.apache.directory.api.ldap.model.message.OpaqueExtendedRequest
addAllControls, addControl, equals, getExtendedResponse, getRequestName, getRequestValue, getResponseType, hashCode, removeControl, setMessageId, setRequestName, setRequestValue
-
Methods inherited from class org.apache.directory.api.ldap.model.message.AbstractExtendedRequest
getResponse, setResponse
-
Methods inherited from class org.apache.directory.api.ldap.model.message.AbstractRequest
hasResponse
-
Methods inherited from class org.apache.directory.api.ldap.model.message.AbstractMessage
get, getControl, getControls, getMessageId, getType, hasControl, put, toString
-
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
-
EndTransactionRequestImpl
public EndTransactionRequestImpl(int messageId)
Creates a new instance of EndTransactionRequestImpl.- Parameters:
messageId
- the message id
-
EndTransactionRequestImpl
public EndTransactionRequestImpl()
Creates a new instance of EndTransactionRequestImpl.
-
-
Method Detail
-
getResultResponse
public EndTransactionResponse getResultResponse()
The result containing response for this request.- Specified by:
getResultResponse
in interfaceResultResponseRequest
- Overrides:
getResultResponse
in classOpaqueExtendedRequest
- Returns:
- the result containing response for this 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
-
toString
public String toString()
Description copied from class:OpaqueExtendedRequest
Get a String representation of an Extended Request- Overrides:
toString
in classOpaqueExtendedRequest
- Returns:
- an Extended Request String
- See Also:
Object.toString()
-
-