|
||||||||||
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.AbstractControl
public abstract class AbstractControl
A Asn1Object to store a Control.
Field Summary | |
---|---|
protected ControlDecoder |
decoder
|
protected byte[] |
value
Optional control value |
protected int |
valueLength
The encoded value length |
Fields inherited from class org.apache.directory.shared.asn1.AbstractAsn1Object |
---|
parent |
Constructor Summary | |
---|---|
AbstractControl(java.lang.String oid)
Default constructor. |
Method Summary | |
---|---|
int |
computeLength()
Compute the object length, which is the sum of all inner length. |
int |
computeLength(int valueLength)
|
java.nio.ByteBuffer |
encode(java.nio.ByteBuffer buffer)
Encode the object to a PDU. |
ControlDecoder |
getDecoder()
Get the associated decoder |
java.lang.String |
getOid()
Get the OID |
byte[] |
getValue()
Get the control value |
boolean |
hasValue()
Tells if the Control has a value or not |
boolean |
isCritical()
Get the criticality |
void |
setCritical(boolean criticality)
Set the criticality |
void |
setValue(byte[] value)
Set the encoded control value |
java.lang.String |
toString()
Return a String representing a Control |
Methods inherited from class org.apache.directory.shared.asn1.AbstractAsn1Object |
---|
addLength, getCurrentLength, getExpectedLength, getParent, getTlvId, setCurrentLength, setExpectedLength, setParent |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected byte[] value
protected int valueLength
protected ControlDecoder decoder
Constructor Detail |
---|
public AbstractControl(java.lang.String oid)
Method Detail |
---|
public java.lang.String getOid()
getOid
in interface Control
public byte[] getValue()
getValue
in interface Control
public void setValue(byte[] value)
setValue
in interface Control
encodedValue
- The encoded control value to storepublic boolean isCritical()
isCritical
in interface Control
true
if the criticality flag is true.public void setCritical(boolean criticality)
setCritical
in interface Control
criticality
- The criticality valuepublic int computeLength()
computeLength
in interface Asn1Object
computeLength
in interface CodecControl
computeLength
in class AbstractAsn1Object
public int computeLength(int valueLength)
public java.nio.ByteBuffer encode(java.nio.ByteBuffer buffer) throws EncoderException
encode
in interface Asn1Object
encode
in interface CodecControl
encode
in class AbstractAsn1Object
buffer
- The buffer where to put the PDU
EncoderException
- if the buffer can't be encodedpublic boolean hasValue()
hasValue
in interface Control
true
if th Control has a value, even containing no bytes.public ControlDecoder getDecoder()
CodecControl
getDecoder
in interface CodecControl
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |