|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opends.server.protocols.ldap.LDAPMessage
public class LDAPMessage
This class defines the data structures and methods to use when interacting with an LDAP message, which is the basic envelope used to hold LDAP requests and responses.
Constructor Summary | |
---|---|
LDAPMessage(int messageID,
ProtocolOp protocolOp)
Creates a new LDAP message with the provided message ID and protocol op but no controls. |
|
LDAPMessage(int messageID,
ProtocolOp protocolOp,
java.util.ArrayList<LDAPControl> controls)
Creates a new LDAP message with the provided message ID, protocol op, and set of controls. |
Method Summary | |
---|---|
static LDAPMessage |
decode(ASN1Sequence messageSequence)
Decodes the provided ASN.1 sequence as an LDAP message. |
ASN1Element |
encode()
Encodes this LDAP message to an ASN.1 element. |
AbandonRequestProtocolOp |
getAbandonRequestProtocolOp()
Retrieves the protocol op for this LDAP message as an abandon request protocol op. |
AddRequestProtocolOp |
getAddRequestProtocolOp()
Retrieves the protocol op for this LDAP message as an add request protocol op. |
AddResponseProtocolOp |
getAddResponseProtocolOp()
Retrieves the protocol op for this LDAP message as an add response protocol op. |
BindRequestProtocolOp |
getBindRequestProtocolOp()
Retrieves the protocol op for this LDAP message as a bind request protocol op. |
BindResponseProtocolOp |
getBindResponseProtocolOp()
Retrieves the protocol op for this LDAP message as a bind response protocol op. |
CompareRequestProtocolOp |
getCompareRequestProtocolOp()
Retrieves the protocol op for this LDAP message as a compare request protocol op. |
CompareResponseProtocolOp |
getCompareResponseProtocolOp()
Retrieves the protocol op for this LDAP message as a compare response protocol op. |
java.util.ArrayList<LDAPControl> |
getControls()
Retrieves the set of controls for this LDAP message. |
DeleteRequestProtocolOp |
getDeleteRequestProtocolOp()
Retrieves the protocol op for this LDAP message as a delete request protocol op. |
DeleteResponseProtocolOp |
getDeleteResponseProtocolOp()
Retrieves the protocol op for this LDAP message as a delete response protocol op. |
ExtendedRequestProtocolOp |
getExtendedRequestProtocolOp()
Retrieves the protocol op for this LDAP message as an extended request protocol op. |
ExtendedResponseProtocolOp |
getExtendedResponseProtocolOp()
Retrieves the protocol op for this LDAP message as an extended response protocol op. |
int |
getMessageID()
Retrieves the message ID for this LDAP message. |
ModifyDNRequestProtocolOp |
getModifyDNRequestProtocolOp()
Retrieves the protocol op for this LDAP message as a modify DN request protocol op. |
ModifyDNResponseProtocolOp |
getModifyDNResponseProtocolOp()
Retrieves the protocol op for this LDAP message as a modify DN response protocol op. |
ModifyRequestProtocolOp |
getModifyRequestProtocolOp()
Retrieves the protocol op for this LDAP message as a modify request protocol op. |
ModifyResponseProtocolOp |
getModifyResponseProtocolOp()
Retrieves the protocol op for this LDAP message as a modify response protocol op. |
java.lang.String |
getProtocolElementName()
Retrieves the name of the protocol associated with this protocol element. |
ProtocolOp |
getProtocolOp()
Retrieves the protocol op for this LDAP message. |
java.lang.String |
getProtocolOpName()
Retrieves the protocol op name for this LDAP message. |
byte |
getProtocolOpType()
Retrieves the protocol op type for this LDAP message. |
SearchRequestProtocolOp |
getSearchRequestProtocolOp()
Retrieves the protocol op for this LDAP message as a search request protocol op. |
SearchResultDoneProtocolOp |
getSearchResultDoneProtocolOp()
Retrieves the protocol op for this LDAP message as a search result done protocol op. |
SearchResultEntryProtocolOp |
getSearchResultEntryProtocolOp()
Retrieves the protocol op for this LDAP message as a search result entry protocol op. |
SearchResultReferenceProtocolOp |
getSearchResultReferenceProtocolOp()
Retrieves the protocol op for this LDAP message as a search result reference protocol op. |
UnbindRequestProtocolOp |
getUnbindRequestProtocolOp()
Retrieves the protocol op for this LDAP message as an unbind request protocol op. |
void |
setMessageID(int messageID)
Specifies the message ID for this LDAP message. |
void |
setProtocolOp(ProtocolOp protocolOp)
Specifies the protocol op for this LDAP message. |
java.lang.String |
toString()
Retrieves a string representation of this LDAP message. |
void |
toString(java.lang.StringBuilder buffer)
Appends a string representation of this protocol element to the provided buffer. |
void |
toString(java.lang.StringBuilder buffer,
int indent)
Appends a string representation of this protocol element to the provided buffer. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public LDAPMessage(int messageID, ProtocolOp protocolOp)
messageID
- The message ID for this LDAP message.protocolOp
- The protocol op for this LDAP message.public LDAPMessage(int messageID, ProtocolOp protocolOp, java.util.ArrayList<LDAPControl> controls)
messageID
- The message ID for this LDAP message.protocolOp
- The protocol op for this LDAP message.controls
- The set of controls for this LDAP message.Method Detail |
---|
public int getMessageID()
public void setMessageID(int messageID)
messageID
- The message ID for this LDAP message.public ProtocolOp getProtocolOp()
public byte getProtocolOpType()
public java.lang.String getProtocolOpName()
public AbandonRequestProtocolOp getAbandonRequestProtocolOp() throws java.lang.ClassCastException
java.lang.ClassCastException
- If the protocol op is not an abandon request
protocol op.public AddRequestProtocolOp getAddRequestProtocolOp() throws java.lang.ClassCastException
java.lang.ClassCastException
- If the protocol op is not an add request
protocol op.public AddResponseProtocolOp getAddResponseProtocolOp() throws java.lang.ClassCastException
java.lang.ClassCastException
- If the protocol op is not an add response
protocol op.public BindRequestProtocolOp getBindRequestProtocolOp() throws java.lang.ClassCastException
java.lang.ClassCastException
- If the protocol op is not a bind request
protocol op.public BindResponseProtocolOp getBindResponseProtocolOp() throws java.lang.ClassCastException
java.lang.ClassCastException
- If the protocol op is not a bind response
protocol op.public CompareRequestProtocolOp getCompareRequestProtocolOp() throws java.lang.ClassCastException
java.lang.ClassCastException
- If the protocol op is not a compare request
protocol op.public CompareResponseProtocolOp getCompareResponseProtocolOp() throws java.lang.ClassCastException
java.lang.ClassCastException
- If the protocol op is not a compare response
protocol op.public DeleteRequestProtocolOp getDeleteRequestProtocolOp() throws java.lang.ClassCastException
java.lang.ClassCastException
- If the protocol op is not a delete request
protocol op.public DeleteResponseProtocolOp getDeleteResponseProtocolOp() throws java.lang.ClassCastException
java.lang.ClassCastException
- If the protocol op is not a delete response
protocol op.public ExtendedRequestProtocolOp getExtendedRequestProtocolOp() throws java.lang.ClassCastException
java.lang.ClassCastException
- If the protocol op is not an extended request
protocol op.public ExtendedResponseProtocolOp getExtendedResponseProtocolOp() throws java.lang.ClassCastException
java.lang.ClassCastException
- If the protocol op is not an extended response
protocol op.public ModifyRequestProtocolOp getModifyRequestProtocolOp() throws java.lang.ClassCastException
java.lang.ClassCastException
- If the protocol op is not a modify request
protocol op.public ModifyResponseProtocolOp getModifyResponseProtocolOp() throws java.lang.ClassCastException
java.lang.ClassCastException
- If the protocol op is not a modify response
protocol op.public ModifyDNRequestProtocolOp getModifyDNRequestProtocolOp() throws java.lang.ClassCastException
java.lang.ClassCastException
- If the protocol op is not a modify DN request
protocol op.public ModifyDNResponseProtocolOp getModifyDNResponseProtocolOp() throws java.lang.ClassCastException
java.lang.ClassCastException
- If the protocol op is not a modify DN response
protocol op.public SearchRequestProtocolOp getSearchRequestProtocolOp() throws java.lang.ClassCastException
java.lang.ClassCastException
- If the protocol op is not a search request
protocol op.public SearchResultDoneProtocolOp getSearchResultDoneProtocolOp() throws java.lang.ClassCastException
java.lang.ClassCastException
- If the protocol op is not a search result done
protocol op.public SearchResultEntryProtocolOp getSearchResultEntryProtocolOp() throws java.lang.ClassCastException
java.lang.ClassCastException
- If the protocol op is not a search result
entry protocol op.public SearchResultReferenceProtocolOp getSearchResultReferenceProtocolOp() throws java.lang.ClassCastException
java.lang.ClassCastException
- If the protocol op is not a search result
reference protocol op.public UnbindRequestProtocolOp getUnbindRequestProtocolOp() throws java.lang.ClassCastException
java.lang.ClassCastException
- If the protocol op is not an unbind request
protocol op.public void setProtocolOp(ProtocolOp protocolOp)
protocolOp
- The protocol op for this LDAP message.public java.util.ArrayList<LDAPControl> getControls()
public ASN1Element encode()
public static LDAPMessage decode(ASN1Sequence messageSequence) throws LDAPException
messageSequence
- The ASN.1 sequence to decode as an LDAP message.
LDAPException
- If a problem occurs while attempting to decode the
LDAP message.public java.lang.String getProtocolElementName()
getProtocolElementName
in interface ProtocolElement
public java.lang.String toString()
toString
in interface ProtocolElement
toString
in class java.lang.Object
public void toString(java.lang.StringBuilder buffer)
toString
in interface ProtocolElement
buffer
- The buffer into which the string representation should be
written.public void toString(java.lang.StringBuilder buffer, int indent)
toString
in interface ProtocolElement
buffer
- The buffer into which the string representation should be
written.indent
- The number of spaces that should be used to indent the
resulting string representation.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |