|
LDAP Classes Implements Java LDAP |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.novell.ldap.LDAPMessage
The base class for LDAP request and response messages.
Subclassed by response messages used in asynchronous operations.
Sample Code: Searchas.java
Field Summary | |
static int |
ABANDON_REQUEST
An abandon request operation. |
static int |
ADD_REQUEST
An add request operation. |
static int |
ADD_RESPONSE
An add response operation. |
static int |
BIND_REQUEST
A bind request operation. |
static int |
BIND_RESPONSE
A bind response operation. |
static int |
COMPARE_REQUEST
A compare result operation. |
static int |
COMPARE_RESPONSE
A compare response operation. |
static int |
DEL_REQUEST
A delete request operation. |
static int |
DEL_RESPONSE
A delete response operation. |
static int |
EXTENDED_REQUEST
An extended request operation. |
static int |
EXTENDED_RESPONSE
An extended response operation. |
static int |
INTERMEDIATE_RESPONSE
An extended response operation. |
protected com.novell.ldap.rfc2251.RfcLDAPMessage |
message
A request or response message for an asynchronous LDAP operation. |
static int |
MODIFY_RDN_REQUEST
A modify RDN request operation. |
static int |
MODIFY_RDN_RESPONSE
A modify RDN response operation. |
static int |
MODIFY_REQUEST
A modify request operation. |
static int |
MODIFY_RESPONSE
A modify response operation. |
static int |
SEARCH_REQUEST
A search request operation. |
static int |
SEARCH_RESPONSE
A search response containing data. |
static int |
SEARCH_RESULT
A search result message - contains search status. |
static int |
SEARCH_RESULT_REFERENCE
A search result reference operation. |
static int |
UNBIND_REQUEST
An unbind request operation. |
Constructor Summary | |
protected |
LDAPMessage(com.novell.ldap.rfc2251.RfcLDAPMessage message)
Creates an Rfc 2251 LDAPMessage when the libraries receive a response from a command. |
Method Summary | |
LDAPControl[] |
getControls()
Returns any controls in the message. |
int |
getMessageID()
Returns the message ID. |
java.lang.String |
getTag()
Retrieves the identifier tag for this message. |
int |
getType()
Returns the LDAP operation type of the message. |
boolean |
isRequest()
Indicates whether the message is a request or a response |
static java.lang.Object |
readDSML(java.io.InputStream input)
This method is used to deserialize the DSML encoded representation of this class. |
void |
readExternal(java.io.ObjectInput in)
Reads the serialized object from the underlying input stream. |
protected void |
setDeserializedValues(LDAPMessage readObject,
com.novell.ldap.rfc2251.RfcControls asn1Ctrls)
|
void |
setTag(java.lang.String stringTag)
Sets a string identifier tag for this message. |
java.lang.String |
toString()
Creates a String representation of this object |
void |
writeDSML(java.io.OutputStream oout)
This method does DSML serialization of the instance. |
void |
writeExternal(java.io.ObjectOutput out)
Writes the object state to a stream in XML format |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int BIND_REQUEST
BIND_REQUEST = 0
public static final int BIND_RESPONSE
BIND_RESPONSE = 1
public static final int UNBIND_REQUEST
UNBIND_REQUEST = 2
public static final int SEARCH_REQUEST
SEARCH_REQUEST = 3
public static final int SEARCH_RESPONSE
SEARCH_RESPONSE = 4
public static final int SEARCH_RESULT
SEARCH_RESULT = 5
public static final int MODIFY_REQUEST
MODIFY_REQUEST = 6
public static final int MODIFY_RESPONSE
MODIFY_RESPONSE = 7
public static final int ADD_REQUEST
ADD_REQUEST = 8
public static final int ADD_RESPONSE
ADD_RESONSE = 9
public static final int DEL_REQUEST
DEL_REQUEST = 10
public static final int DEL_RESPONSE
DEL_RESONSE = 11
public static final int MODIFY_RDN_REQUEST
MODIFY_RDN_REQUEST = 12
public static final int MODIFY_RDN_RESPONSE
MODIFY_RDN_RESPONSE = 13
public static final int COMPARE_REQUEST
COMPARE_REQUEST = 14
public static final int COMPARE_RESPONSE
COMPARE_RESPONSE = 15
public static final int ABANDON_REQUEST
ABANDON_REQUEST = 16
public static final int SEARCH_RESULT_REFERENCE
SEARCH_RESULT_REFERENCE = 19
public static final int EXTENDED_REQUEST
EXTENDED_REQUEST = 23
public static final int EXTENDED_RESPONSE
EXTENDED_RESONSE = 24
public static final int INTERMEDIATE_RESPONSE
EXTENDED_RESONSE = 24
protected com.novell.ldap.rfc2251.RfcLDAPMessage message
Constructor Detail |
protected LDAPMessage(com.novell.ldap.rfc2251.RfcLDAPMessage message)
message
- A response message.Method Detail |
public LDAPControl[] getControls()
public int getMessageID()
public int getType()
The type is one of the following:
public boolean isRequest()
public java.lang.String toString()
public void setTag(java.lang.String stringTag)
This method allows an API to set a tag and later identify messages by retrieving the tag associated with the message. Tags are set by the application and not by the API or the server. Message tags are not included with any message sent to or received from the server.
Tags set on a request to the server are automatically associated with the response messages when they are received by the API and transferred to the application. The application can explicitly set a different value in a response message.
To set a value in a server request, for example an
LDAPSearchRequest
, you must create the object,
set the tag, and use the
LDAPConnection.sendRequest()
method to send it to the server.
stringTag
- the String assigned to identify this message.getTag()
,
isRequest()
public java.lang.String getTag()
An identifier can be associated with a message with the
setTag
method.
Tags are set by the application and not by the API or the server.
If a server response isRequest() == false
has no tag,
the tag associated with the corresponding server request is used.
null
if none.setTag(java.lang.String)
,
isRequest()
public void writeDSML(java.io.OutputStream oout) throws java.io.IOException
oout
- Outputstream where the serialzed data has to be written
java.io.IOException
- if write fails on OutputStreampublic static java.lang.Object readDSML(java.io.InputStream input) throws java.io.IOException
input
- InputStream for the DSML formatted data.
java.io.IOException
- when serialization fails.public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
out
- The ObjectOutput stream where the Object in XML format
is being written to
java.io.IOException
- - If I/O errors occurpublic void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
in
- The ObjectInput stream where the Serialized Object is being read from
java.io.IOException
- - If I/O errors occur
java.lang.ClassNotFoundException
- - If the class for an object being restored
cannot be found.protected void setDeserializedValues(LDAPMessage readObject, com.novell.ldap.rfc2251.RfcControls asn1Ctrls) throws java.io.IOException, java.lang.ClassNotFoundException
java.io.IOException
java.lang.ClassNotFoundException
|
LDAP Classes Implements Java LDAP |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |