Package netscape.ldap
Class LDAPMessage
java.lang.Object
netscape.ldap.LDAPMessage
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
LDAPResponse
,LDAPSearchResult
,LDAPSearchResultReference
Base class for LDAP request and response messages.
This class represents the LDAPMessage in RFC2251. The
message is the entity that got transferred back and
fro between the server and the client interface. Each
message has a protocol operation. The protocol operation
indicates if it is a request or response.
LDAPMessage ::= SEQUENCE { messageID MessageID, protocolOp CHOICE { bindRequest BindRequest, ... } controls [0] Controls OPTIONAL }
- Version:
- 1.0
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
private LDAPControl[]
private int
Internal variablesprivate JDAPProtocolOp
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
(package private) static final long
static final int
-
Constructor Summary
ConstructorsConstructorDescriptionLDAPMessage
(int msgid, JDAPProtocolOp op) Constructs a ldap message.LDAPMessage
(int msgid, JDAPProtocolOp op, LDAPControl[] controls) -
Method Summary
Modifier and TypeMethodDescriptionRetrieves list of controls.int
Returns the message identifer.(package private) JDAPProtocolOp
Retrieves the protocol operation.int
getType()
Returns the LDAP operation type of the message(package private) static LDAPMessage
parseMessage
(BERElement element) Creates a ldap message from a BERElement.toString()
Returns string representation of an LDAP message.(package private) StringBuffer
Returns string representation of a ldap message with the time stamp.(package private) void
Writes the ber encoding to stream.
-
Field Details
-
serialVersionUID
static final long serialVersionUID- See Also:
-
BIND_REQUEST
public static final int BIND_REQUEST- See Also:
-
BIND_RESPONSE
public static final int BIND_RESPONSE- See Also:
-
UNBIND_REQUEST
public static final int UNBIND_REQUEST- See Also:
-
SEARCH_REQUEST
public static final int SEARCH_REQUEST- See Also:
-
SEARCH_RESPONSE
public static final int SEARCH_RESPONSE- See Also:
-
SEARCH_RESULT
public static final int SEARCH_RESULT- See Also:
-
MODIFY_REQUEST
public static final int MODIFY_REQUEST- See Also:
-
MODIFY_RESPONSE
public static final int MODIFY_RESPONSE- See Also:
-
ADD_REQUEST
public static final int ADD_REQUEST- See Also:
-
ADD_RESPONSE
public static final int ADD_RESPONSE- See Also:
-
DEL_REQUEST
public static final int DEL_REQUEST- See Also:
-
DEL_RESPONSE
public static final int DEL_RESPONSE- See Also:
-
MODIFY_RDN_REQUEST
public static final int MODIFY_RDN_REQUEST- See Also:
-
MODIFY_RDN_RESPONSE
public static final int MODIFY_RDN_RESPONSE- See Also:
-
COMPARE_REQUEST
public static final int COMPARE_REQUEST- See Also:
-
COMPARE_RESPONSE
public static final int COMPARE_RESPONSE- See Also:
-
ABANDON_REQUEST
public static final int ABANDON_REQUEST- See Also:
-
SEARCH_RESULT_REFERENCE
public static final int SEARCH_RESULT_REFERENCE- See Also:
-
EXTENDED_REQUEST
public static final int EXTENDED_REQUEST- See Also:
-
EXTENDED_RESPONSE
public static final int EXTENDED_RESPONSE- See Also:
-
m_msgid
private int m_msgidInternal variables -
m_protocolOp
-
m_controls
-
-
Constructor Details
-
LDAPMessage
LDAPMessage(int msgid, JDAPProtocolOp op) Constructs a ldap message.- Parameters:
msgid
- message identifierop
- operation protocol
-
LDAPMessage
LDAPMessage(int msgid, JDAPProtocolOp op, LDAPControl[] controls)
-
-
Method Details
-
parseMessage
Creates a ldap message from a BERElement. This method is used to parse LDAP response messages- Parameters:
element
- ber element constructed from incoming byte stream- Throws:
IOException
-
getMessageID
public int getMessageID()Returns the message identifer.- Returns:
- message identifer.
-
getType
public int getType()Returns the LDAP operation type of the message- Returns:
- message type.
-
getProtocolOp
JDAPProtocolOp getProtocolOp()Retrieves the protocol operation.- Returns:
- protocol operation.
-
getControls
Retrieves list of controls.- Returns:
- controls.
-
write
Writes the ber encoding to stream.- Parameters:
s
- output stream- Throws:
IOException
-
toString
Returns string representation of an LDAP message. -
toTraceString
StringBuffer toTraceString()Returns string representation of a ldap message with the time stamp. Used for message trace- Returns:
- ldap message with the time stamp
-