Class TransactionSpecificationDecorator
- java.lang.Object
-
- org.apache.directory.api.ldap.codec.api.ControlDecorator<TransactionSpecification>
-
- org.apache.directory.api.ldap.extras.controls.transaction_impl.TransactionSpecificationDecorator
-
- All Implemented Interfaces:
Asn1Object
,CodecControl<TransactionSpecification>
,Decorator<TransactionSpecification>
,TransactionSpecification
,Control
public class TransactionSpecificationDecorator extends ControlDecorator<TransactionSpecification> implements TransactionSpecification
TransactionSpecification decorator.- Author:
- Apache Directory Project
-
-
Field Summary
-
Fields inherited from interface org.apache.directory.api.ldap.extras.controls.transaction.TransactionSpecification
OID
-
-
Constructor Summary
Constructors Constructor Description TransactionSpecificationDecorator(LdapApiService codec, TransactionSpecification decoratedControl)
Create a new instance of TransactionSpecificationDecorator
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
computeLength()
Compute the object length, which is the sum of all inner length.Asn1Object
decode(byte[] controlBytes)
Decodes raw ASN.1 encoded bytes into an Asn1Object for the control.ByteBuffer
encode(ByteBuffer buffer)
Encode the object to a PDU.byte[]
getIdentifier()
void
setIdentifier(byte[] identifier)
Set the transaction ID-
Methods inherited from class org.apache.directory.api.ldap.codec.api.ControlDecorator
equals, getCodecService, getDecorated, getOid, getValue, hashCode, hasValue, isCritical, setCritical, setDecorated, setValue, toString
-
Methods inherited from interface org.apache.directory.api.ldap.model.message.Control
getOid, isCritical, setCritical
-
-
-
-
Constructor Detail
-
TransactionSpecificationDecorator
public TransactionSpecificationDecorator(LdapApiService codec, TransactionSpecification decoratedControl)
Create a new instance of TransactionSpecificationDecorator- Parameters:
codec
- The LDAP Service to usedecoratedControl
- The control to decorate
-
-
Method Detail
-
decode
public Asn1Object decode(byte[] controlBytes) throws DecoderException
Decodes raw ASN.1 encoded bytes into an Asn1Object for the control.- Specified by:
decode
in interfaceCodecControl<TransactionSpecification>
- Parameters:
controlBytes
- the encoded control bytes- Returns:
- the decoded Asn1Object for the control
- Throws:
DecoderException
- if anything goes wrong
-
computeLength
public int computeLength()
Compute the object length, which is the sum of all inner length.- Specified by:
computeLength
in interfaceAsn1Object
- Returns:
- The object's computed length
-
encode
public ByteBuffer encode(ByteBuffer buffer) throws EncoderException
Encode the object to a PDU.- Specified by:
encode
in interfaceAsn1Object
- Parameters:
buffer
- The buffer where to put the PDU- Returns:
- The encoded PDU.
- Throws:
EncoderException
- if the buffer can't be encoded
-
getIdentifier
public byte[] getIdentifier()
- Specified by:
getIdentifier
in interfaceTransactionSpecification
- Returns:
- The transaction identifier
-
setIdentifier
public void setIdentifier(byte[] identifier)
Set the transaction ID- Specified by:
setIdentifier
in interfaceTransactionSpecification
- Parameters:
identifier
- The transaction identifier, an opaque byte array
-
-