|
||||||||||
| 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
public class LdapMessageCodec
The main ldapObject : every Ldap Message are encapsulated in it. It contains a message Id, a operation (protocolOp) and one ore more Controls.
| Field Summary |
|---|
| Fields inherited from class org.apache.directory.shared.asn1.AbstractAsn1Object |
|---|
parent |
| Constructor Summary | |
|---|---|
LdapMessageCodec()
Creates a new LdapMessage object. |
|
| Method Summary | |
|---|---|
void |
addControl(ControlCodec control)
Add a control to the Controls array |
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 |
java.nio.ByteBuffer |
encode(java.nio.ByteBuffer buffer)
Generate the PDU which contains the encoded object. |
AbandonRequestCodec |
getAbandonRequest()
Get a AbandonRequest ldapObject, assuming that the caller knows that it is the LdapMessage exact type. |
AddRequestCodec |
getAddRequest()
Get a AddRequest ldapObject, assuming that the caller knows that it is the LdapMessage exact type. |
AddResponseCodec |
getAddResponse()
Get a AddResponse ldapObject, assuming that the caller knows that it is the LdapMessage exact type. |
BindRequestCodec |
getBindRequest()
Get a BindRequest ldapObject, assuming that the caller knows that it is the LdapMessage exact type. |
BindResponseCodec |
getBindResponse()
Get a BindResponse ldapObject, assuming that the caller knows that it is the LdapMessage exact type. |
CompareRequestCodec |
getCompareRequest()
Get a CompareRequest ldapObject, assuming that the caller knows that it is the LdapMessage exact type. |
CompareResponseCodec |
getCompareResponse()
Get a CompareResponse ldapObject, assuming that the caller knows that it is the LdapMessage exact type. |
java.util.List<ControlCodec> |
getControls()
Get the Control Objects |
ControlCodec |
getControls(int i)
Get the Control Object at a specific index |
ControlCodec |
getCurrentControl()
Get the current Control Object |
DelRequestCodec |
getDelRequest()
Get a DelRequest ldapObject, assuming that the caller knows that it is the LdapMessage exact type. |
DelResponseCodec |
getDelResponse()
Get a DelResponse ldapObject, assuming that the caller knows that it is the LdapMessage exact type. |
ExtendedRequestCodec |
getExtendedRequest()
Get a ExtendedRequest ldapObject, assuming that the caller knows that it is the LdapMessage exact type. |
ExtendedResponseCodec |
getExtendedResponse()
Get a ExtendedResponse ldapObject, assuming that the caller knows that it is the LdapMessage exact type. |
IntermediateResponseCodec |
getIntermediateResponse()
Get a IntermediateResponse ldapObject, assuming that the caller knows that it is the LdapMessage exact type. |
LdapResponseCodec |
getLdapResponse()
Get the encapsulated Ldap response. |
int |
getMessageId()
Get the message ID |
int |
getMessageType()
Get the message type |
java.lang.String |
getMessageTypeName()
Get the message type Name |
ModifyDNRequestCodec |
getModifyDNRequest()
Get a ModifyDNRequest ldapObject, assuming that the caller knows that it is the LdapMessage exact type. |
ModifyDNResponseCodec |
getModifyDNResponse()
Get a ModifyDNResponse ldapObject, assuming that the caller knows that it is the LdapMessage exact type. |
ModifyRequestCodec |
getModifyRequest()
Get a ModifyRequest ldapObject, assuming that the caller knows that it is the LdapMessage exact type. |
ModifyResponseCodec |
getModifyResponse()
Get a ModifyResponse ldapObject, assuming that the caller knows that it is the LdapMessage exact type. |
SearchRequestCodec |
getSearchRequest()
Get a SearchRequest ldapObject, assuming that the caller knows that it is the LdapMessage exact type. |
SearchResultDoneCodec |
getSearchResultDone()
Get a SearchResultDone ldapObject, assuming that the caller knows that it is the LdapMessage exact type. |
SearchResultEntryCodec |
getSearchResultEntry()
Get a SearchResultEntry ldapObject, assuming that the caller knows that it is the LdapMessage exact type. |
SearchResultReferenceCodec |
getSearchResultReference()
Get a SearchResultReference ldapObject, assuming that the caller knows that it is the LdapMessage exact type. |
UnBindRequestCodec |
getUnBindRequest()
Get a UnBindRequest ldapObject, assuming that the caller knows that it is the LdapMessage exact type. |
void |
initControls()
Init the controls array |
void |
setMessageId(int messageId)
Set the message ID |
void |
setProtocolOP(Asn1Object protocolOp)
Set the ProtocolOP |
java.lang.String |
toString()
Get a String representation of a LdapMessage |
| 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 |
| Constructor Detail |
|---|
public LdapMessageCodec()
| Method Detail |
|---|
public ControlCodec getControls(int i)
i - The index of the Control Object to get
public java.util.List<ControlCodec> getControls()
public ControlCodec getCurrentControl()
public void addControl(ControlCodec control)
control - The Control to addpublic void initControls()
public int getMessageId()
public void setMessageId(int messageId)
messageId - The message IDpublic int getMessageType()
public java.lang.String getMessageTypeName()
public LdapResponseCodec getLdapResponse()
public AbandonRequestCodec getAbandonRequest()
public AddRequestCodec getAddRequest()
public AddResponseCodec getAddResponse()
public BindRequestCodec getBindRequest()
public BindResponseCodec getBindResponse()
public CompareRequestCodec getCompareRequest()
public CompareResponseCodec getCompareResponse()
public DelRequestCodec getDelRequest()
public DelResponseCodec getDelResponse()
public ExtendedRequestCodec getExtendedRequest()
public ExtendedResponseCodec getExtendedResponse()
public IntermediateResponseCodec getIntermediateResponse()
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 setProtocolOP(Asn1Object protocolOp)
protocolOp - The protocolOp to set.public int computeLength()
computeLength in interface Asn1ObjectcomputeLength in class AbstractAsn1Object
public java.nio.ByteBuffer encode(java.nio.ByteBuffer buffer)
throws EncoderException
encode in interface Asn1Objectencode in class AbstractAsn1Objectbuffer - The encoded PDU
EncoderException - If anything goes wrong.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 | |||||||||