public class EntryChangeDecorator extends ControlDecorator<EntryChange> implements EntryChange
Modifier and Type | Field and Description |
---|---|
static int |
UNDEFINED_CHANGE_NUMBER |
value, valueLength
OID
Constructor and Description |
---|
EntryChangeDecorator(LdapApiService codec)
Creates a new instance of EntryChangeDecoder wrapping a newly created
EntryChange Control object.
|
EntryChangeDecorator(LdapApiService codec,
EntryChange control)
Creates a new instance of EntryChangeDecorator wrapping the supplied
EntryChange Control.
|
Modifier and Type | Method and Description |
---|---|
int |
computeLength()
Compute the EntryChangeControl length
0x30 L1
|
+--> 0x0A 0x0(1-4) [1|2|4|8] (changeType)
[+--> 0x04 L2 previousDN]
[+--> 0x02 0x0(1-4) [0..2^63-1] (changeNumber)]
|
Asn1Object |
decode(byte[] controlBytes)
Decodes raw ASN.1 encoded bytes into an Asn1Object for the control.
|
ByteBuffer |
encode(ByteBuffer buffer)
Encodes the entry change control.
|
long |
getChangeNumber() |
ChangeType |
getChangeType() |
Dn |
getPreviousDn() |
byte[] |
getValue()
Get the control value
|
void |
setChangeNumber(long changeNumber) |
void |
setChangeType(ChangeType changeType)
Set the ChangeType
|
void |
setPreviousDn(Dn previousDn) |
equals, getCodecService, getDecorated, getOid, hashCode, hasValue, isCritical, setCritical, setDecorated, setValue, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getOid, isCritical, setCritical
public static final int UNDEFINED_CHANGE_NUMBER
public EntryChangeDecorator(LdapApiService codec)
public EntryChangeDecorator(LdapApiService codec, EntryChange control)
control
- The EntryChange Control to be decorated.public int computeLength()
computeLength
in interface Asn1Object
computeLength
in interface Decorator<EntryChange>
computeLength
in class ControlDecorator<EntryChange>
public ByteBuffer encode(ByteBuffer buffer) throws EncoderException
encode
in interface Asn1Object
encode
in interface Decorator<EntryChange>
buffer
- The encoded sinkEncoderException
- If anything goes wrong.public byte[] getValue()
getValue
in interface CodecControl<EntryChange>
getValue
in class ControlDecorator<EntryChange>
public ChangeType getChangeType()
getChangeType
in interface EntryChange
public void setChangeType(ChangeType changeType)
setChangeType
in interface EntryChange
changeType
- Add, Delete; Modify or ModifyDNpublic Dn getPreviousDn()
getPreviousDn
in interface EntryChange
public void setPreviousDn(Dn previousDn)
setPreviousDn
in interface EntryChange
public long getChangeNumber()
getChangeNumber
in interface EntryChange
public void setChangeNumber(long changeNumber)
setChangeNumber
in interface EntryChange
public Asn1Object decode(byte[] controlBytes) throws DecoderException
decode
in interface CodecControl<EntryChange>
controlBytes
- the encoded control bytesDecoderException
- if anything goes wrongCopyright © 2003–2014 The Apache Software Foundation. All rights reserved.