|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.directory.shared.asn1.AbstractAsn1Object
org.apache.directory.shared.ldap.codec.controls.ControlDecorator<E>
E - public abstract class ControlDecorator<E extends Control>
Decorates Control objects by wrapping them, and enabling them as CodecControls so the codec to store transient information associated with the Control in the decorator while processing.
| Field Summary | |
|---|---|
protected byte[] |
value
The encoded value of the control. |
protected int |
valueLength
The encoded value length |
| Constructor Summary | |
|---|---|
ControlDecorator(LdapCodecService codec,
E decoratedControl)
Creates a ControlDecorator to codec enable it. |
|
| Method Summary | |
|---|---|
int |
computeLength()
Compute the object length, which is the sum of all inner length. |
boolean |
equals(Object o)
|
LdapCodecService |
getCodecService()
Gets the codec service responsible for managing the encoding and decoding of the decorated objects. |
E |
getDecorated()
Gets the object being decorated by this IDecorator. |
String |
getOid()
Get the OID |
byte[] |
getValue()
Get the control value |
int |
hashCode()
|
boolean |
hasValue()
Checks to see if a value is set for this CodecControl. |
boolean |
isCritical()
Get the criticality |
void |
setCritical(boolean criticality)
Set the criticality |
void |
setDecorated(E decorated)
|
void |
setValue(byte[] value)
Set the encoded control value |
String |
toString()
Return a String representing a Control |
| Methods inherited from class org.apache.directory.shared.asn1.AbstractAsn1Object |
|---|
addLength, encode, getCurrentLength, getExpectedLength, getParent, getTlvId, setCurrentLength, setExpectedLength, setParent |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.apache.directory.shared.ldap.codec.api.CodecControl |
|---|
decode |
| Methods inherited from interface org.apache.directory.shared.ldap.codec.api.Decorator |
|---|
encode |
| Field Detail |
|---|
protected int valueLength
protected byte[] value
| Constructor Detail |
|---|
public ControlDecorator(LdapCodecService codec,
E decoratedControl)
decoratedControl - The Control to decorate.| Method Detail |
|---|
public E getDecorated()
getDecorated in interface Decorator<E extends Control>public void setDecorated(E decorated)
public LdapCodecService getCodecService()
getCodecService in interface Decorator<E extends Control>public String getOid()
getOid in interface Controlpublic boolean hasValue()
CodecControl.
hasValue in interface CodecControl<E extends Control>public byte[] getValue()
getValue in interface CodecControl<E extends Control>public void setValue(byte[] value)
setValue in interface CodecControl<E extends Control>value - The encoded control value to storepublic boolean isCritical()
isCritical in interface Controltrue if the criticality flag is true.public void setCritical(boolean criticality)
setCritical in interface Controlcriticality - The criticality valuepublic int computeLength()
computeLength in interface Asn1ObjectcomputeLength in interface Decorator<E extends Control>computeLength in class AbstractAsn1Objectpublic int hashCode()
hashCode in class ObjectObject.hashCode()public boolean equals(Object o)
equals in class ObjectObject.equals(Object)public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||