|
||||||||||
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.LdapMessageCodec
org.apache.directory.shared.dsmlv2.LdapMessageDecorator
public abstract class LdapMessageDecorator
Decorator class for LDAP Message. This is the top level class, the one that holds the instance.
Field Summary | |
---|---|
protected LdapMessageCodec |
instance
The decorated instance |
Fields inherited from class org.apache.directory.shared.ldap.codec.LdapMessageCodec |
---|
ldapMessageLength |
Fields inherited from class org.apache.directory.shared.asn1.AbstractAsn1Object |
---|
parent |
Constructor Summary | |
---|---|
LdapMessageDecorator(LdapMessageCodec ldapMessage)
Creates a new instance of LdapMessageDecorator. |
Method Summary | |
---|---|
void |
addControl(Control control)
Add a control to the Controls array |
void |
addLength(int length)
Add a length to the object |
int |
computeLength()
Compute the LdapMessage length LdapMessage : 0x30 L1 | +--> 0x02 0x0(1-4) [0..2^31-1] (MessageId) +--> protocolOp [+--> Controls] MessageId length = Length(0x02) + length(MessageId) + MessageId.length L1 = length(ProtocolOp) LdapMessage length = Length(0x30) + Length(L1) + MessageId length + L1 |
int |
computeLengthProtocolOp()
|
java.nio.ByteBuffer |
encode(java.nio.ByteBuffer buffer)
Encode the object to a PDU. |
void |
encodeProtocolOp(java.nio.ByteBuffer buffer)
|
AbandonRequestCodec |
getAbandonRequest()
|
AddRequestCodec |
getAddRequest()
|
AddResponseCodec |
getAddResponse()
|
BindRequestCodec |
getBindRequest()
|
BindResponseCodec |
getBindResponse()
|
CompareRequestCodec |
getCompareRequest()
|
CompareResponseCodec |
getCompareResponse()
|
java.util.List<Control> |
getControls()
Get the Control Objects |
Control |
getControls(int i)
Get the Control Object at a specific index |
Control |
getCurrentControl()
Get the current Control Object |
int |
getCurrentLength()
Get the current object length, which is the sum of all inner length already decoded. |
DelRequestCodec |
getDelRequest()
|
DelResponseCodec |
getDelResponse()
|
int |
getExpectedLength()
Get the expected object length. |
ExtendedRequestCodec |
getExtendedRequest()
|
ExtendedResponseCodec |
getExtendedResponse()
|
LdapResponseCodec |
getLdapResponse()
|
int |
getMessageId()
Get the message ID |
MessageTypeEnum |
getMessageType()
Get the message type |
java.lang.String |
getMessageTypeName()
Get the message type Name |
ModifyDNRequestCodec |
getModifyDNRequest()
|
ModifyDNResponseCodec |
getModifyDNResponse()
|
ModifyRequestCodec |
getModifyRequest()
|
ModifyResponseCodec |
getModifyResponse()
|
AbstractAsn1Object |
getParent()
Get the parent |
SearchRequestCodec |
getSearchRequest()
|
SearchResultDoneCodec |
getSearchResultDone()
|
SearchResultEntryCodec |
getSearchResultEntry()
|
SearchResultReferenceCodec |
getSearchResultReference()
|
UnBindRequestCodec |
getUnBindRequest()
|
void |
setCurrentLength(int currentLength)
Set the current length |
void |
setExpectedLength(int expectedLength)
Set the expected length |
void |
setMessageId(int messageId)
Set the message ID |
void |
setParent(AbstractAsn1Object parent)
Set the parent |
java.lang.String |
toString()
|
Methods inherited from class org.apache.directory.shared.ldap.codec.LdapMessageCodec |
---|
addControls, encode, getCodecControl, initControls, toString |
Methods inherited from class org.apache.directory.shared.asn1.AbstractAsn1Object |
---|
getTlvId |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected LdapMessageCodec instance
Constructor Detail |
---|
public LdapMessageDecorator(LdapMessageCodec ldapMessage)
ldapMessage
- the message to decorateMethod Detail |
---|
public void addControl(Control control)
LdapMessageCodec
addControl
in class LdapMessageCodec
control
- The Control to addpublic int computeLength()
LdapMessageCodec
computeLength
in interface Asn1Object
computeLength
in class LdapMessageCodec
public int computeLengthProtocolOp()
computeLengthProtocolOp
in class LdapMessageCodec
public java.nio.ByteBuffer encode(java.nio.ByteBuffer buffer) throws EncoderException
AbstractAsn1Object
encode
in interface Asn1Object
encode
in class AbstractAsn1Object
buffer
- The buffer where to put the PDU
EncoderException
- if the buffer can't be encodedpublic void encodeProtocolOp(java.nio.ByteBuffer buffer) throws EncoderException
encodeProtocolOp
in class LdapMessageCodec
EncoderException
public AbandonRequestCodec getAbandonRequest()
public AddRequestCodec getAddRequest()
public AddResponseCodec getAddResponse()
public BindRequestCodec getBindRequest()
public BindResponseCodec getBindResponse()
public CompareRequestCodec getCompareRequest()
public CompareResponseCodec getCompareResponse()
public java.util.List<Control> getControls()
LdapMessageCodec
getControls
in class LdapMessageCodec
public Control getControls(int i)
LdapMessageCodec
getControls
in class LdapMessageCodec
i
- The index of the Control Object to get
public Control getCurrentControl()
LdapMessageCodec
getCurrentControl
in class LdapMessageCodec
public DelRequestCodec getDelRequest()
public DelResponseCodec getDelResponse()
public ExtendedRequestCodec getExtendedRequest()
public ExtendedResponseCodec getExtendedResponse()
public LdapResponseCodec getLdapResponse()
public int getMessageId()
LdapMessageCodec
getMessageId
in class LdapMessageCodec
public MessageTypeEnum getMessageType()
LdapMessageCodec
getMessageType
in class LdapMessageCodec
public java.lang.String getMessageTypeName()
LdapMessageCodec
getMessageTypeName
in class LdapMessageCodec
public ModifyDNRequestCodec getModifyDNRequest()
public ModifyDNResponseCodec getModifyDNResponse()
public ModifyRequestCodec getModifyRequest()
public ModifyResponseCodec getModifyResponse()
public SearchRequestCodec getSearchRequest()
public SearchResultDoneCodec getSearchResultDone()
public SearchResultEntryCodec getSearchResultEntry()
public SearchResultReferenceCodec getSearchResultReference()
public UnBindRequestCodec getUnBindRequest()
public void setMessageId(int messageId)
LdapMessageCodec
setMessageId
in class LdapMessageCodec
messageId
- The message IDpublic java.lang.String toString()
toString
in class java.lang.Object
public void addLength(int length) throws DecoderException
AbstractAsn1Object
addLength
in interface Asn1Object
addLength
in class AbstractAsn1Object
length
- The length to add.
DecoderException
- Thrown if the current length exceed the expected lengthpublic int getCurrentLength()
AbstractAsn1Object
getCurrentLength
in interface Asn1Object
getCurrentLength
in class AbstractAsn1Object
public int getExpectedLength()
AbstractAsn1Object
getExpectedLength
in interface Asn1Object
getExpectedLength
in class AbstractAsn1Object
public AbstractAsn1Object getParent()
AbstractAsn1Object
getParent
in interface Asn1Object
getParent
in class AbstractAsn1Object
public void setCurrentLength(int currentLength)
AbstractAsn1Object
setCurrentLength
in interface Asn1Object
setCurrentLength
in class AbstractAsn1Object
currentLength
- The currentLength to set.public void setExpectedLength(int expectedLength)
AbstractAsn1Object
setExpectedLength
in interface Asn1Object
setExpectedLength
in class AbstractAsn1Object
expectedLength
- The expectedLength to set.public void setParent(AbstractAsn1Object parent)
AbstractAsn1Object
setParent
in class AbstractAsn1Object
parent
- The parent to set.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |