|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.directory.shared.asn1.Asn1Object
org.apache.directory.shared.ldap.codec.LdapMessage
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.Asn1Object |
parent |
Constructor Summary | |
LdapMessage()
Creates a new LdapMessage object. |
Method Summary | |
void |
addControl(Control 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. |
AbandonRequest |
getAbandonRequest()
Get a AbandonRequest ldapObject, assuming that the caller knows that it is the LdapMessage exact type. |
AddRequest |
getAddRequest()
Get a AddRequest ldapObject, assuming that the caller knows that it is the LdapMessage exact type. |
AddResponse |
getAddResponse()
Get a AddResponse ldapObject, assuming that the caller knows that it is the LdapMessage exact type. |
BindRequest |
getBindRequest()
Get a BindRequest ldapObject, assuming that the caller knows that it is the LdapMessage exact type. |
BindResponse |
getBindResponse()
Get a BindResponse ldapObject, assuming that the caller knows that it is the LdapMessage exact type. |
CompareRequest |
getCompareRequest()
Get a CompareRequest ldapObject, assuming that the caller knows that it is the LdapMessage exact type. |
CompareResponse |
getCompareResponse()
Get a CompareResponse ldapObject, assuming that the caller knows that it is the LdapMessage exact type. |
java.util.ArrayList |
getControls()
Get the Control Objects |
Control |
getControls(int i)
Get the Control Object at a specific index |
Control |
getCurrentControl()
Get the current Control Object |
DelRequest |
getDelRequest()
Get a DelRequest ldapObject, assuming that the caller knows that it is the LdapMessage exact type. |
DelResponse |
getDelResponse()
Get a DelResponse ldapObject, assuming that the caller knows that it is the LdapMessage exact type. |
ExtendedRequest |
getExtendedRequest()
Get a ExtendedRequest ldapObject, assuming that the caller knows that it is the LdapMessage exact type. |
ExtendedResponse |
getExtendedResponse()
Get a ExtendedResponse ldapObject, assuming that the caller knows that it is the LdapMessage exact type. |
LdapResponse |
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 |
ModifyDNRequest |
getModifyDNRequest()
Get a ModifyDNRequest ldapObject, assuming that the caller knows that it is the LdapMessage exact type. |
ModifyDNResponse |
getModifyDNResponse()
Get a ModifyDNResponse ldapObject, assuming that the caller knows that it is the LdapMessage exact type. |
ModifyRequest |
getModifyRequest()
Get a ModifyRequest ldapObject, assuming that the caller knows that it is the LdapMessage exact type. |
ModifyResponse |
getModifyResponse()
Get a ModifyResponse ldapObject, assuming that the caller knows that it is the LdapMessage exact type. |
SearchRequest |
getSearchRequest()
Get a SearchRequest ldapObject, assuming that the caller knows that it is the LdapMessage exact type. |
SearchResultDone |
getSearchResultDone()
Get a SearchResultDone ldapObject, assuming that the caller knows that it is the LdapMessage exact type. |
SearchResultEntry |
getSearchResultEntry()
Get a SearchResultEntry ldapObject, assuming that the caller knows that it is the LdapMessage exact type. |
SearchResultReference |
getSearchResultReference()
Get a SearchResultReference ldapObject, assuming that the caller knows that it is the LdapMessage exact type. |
UnBindRequest |
getUnBindRequest()
Get a UnBindRequest ldapObject, assuming that the caller knows that it is the LdapMessage exact type. |
void |
initControl()
Init the controls array |
void |
setMessageId(int messageId)
Set the message ID |
void |
setProtocolOP(org.apache.directory.shared.asn1.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.Asn1Object |
addLength, getCurrentLength, getExpectedLength, getParent, setCurrentLength, setExpectedLength, setParent |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public LdapMessage()
Method Detail |
public Control getControls(int i)
i
- The index of the Control Object to get
public java.util.ArrayList getControls()
public Control getCurrentControl()
public void addControl(Control control)
control
- The Control to addpublic void initControl()
public int getMessageId()
public void setMessageId(int messageId)
messageId
- The message IDpublic int getMessageType()
public java.lang.String getMessageTypeName()
public LdapResponse getLdapResponse()
public AbandonRequest getAbandonRequest()
public AddRequest getAddRequest()
public AddResponse getAddResponse()
public BindRequest getBindRequest()
public BindResponse getBindResponse()
public CompareRequest getCompareRequest()
public CompareResponse getCompareResponse()
public DelRequest getDelRequest()
public DelResponse getDelResponse()
public ExtendedRequest getExtendedRequest()
public ExtendedResponse getExtendedResponse()
public ModifyDNRequest getModifyDNRequest()
public ModifyDNResponse getModifyDNResponse()
public ModifyRequest getModifyRequest()
public ModifyResponse getModifyResponse()
public SearchRequest getSearchRequest()
public SearchResultDone getSearchResultDone()
public SearchResultEntry getSearchResultEntry()
public SearchResultReference getSearchResultReference()
public UnBindRequest getUnBindRequest()
public void setProtocolOP(org.apache.directory.shared.asn1.Asn1Object protocolOp)
protocolOp
- The protocolOp to set.public int computeLength()
public java.nio.ByteBuffer encode(java.nio.ByteBuffer buffer) throws org.apache.directory.shared.asn1.codec.EncoderException
buffer
- The encoded PDU
org.apache.directory.shared.asn1.codec.EncoderException
- If anything goes wrong.public java.lang.String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |