|
All LDAP Classes Internal LDAP Classes |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.novell.ldap.LDAPMessageQueue
public abstract class LDAPMessageQueue
Represents a queue of incoming asynchronous messages from the server.
It is the common interface for LDAPResponseQueue
and
LDAPSearchQueue
.
Field Summary | |
---|---|
(package private) MessageAgent |
agent
The message agent object associated with this queue |
(package private) java.lang.String |
name
|
(package private) static java.lang.Object |
nameLock
|
(package private) static int |
queueNum
|
Constructor Summary | |
---|---|
LDAPMessageQueue(java.lang.String myname,
MessageAgent agent)
Constructs a response queue using the specified message agent |
Method Summary | |
---|---|
(package private) java.lang.String |
getDebugName()
Returns the name used for debug |
(package private) MessageAgent |
getMessageAgent()
Returns the internal client message agent |
int[] |
getMessageIDs()
Returns the message IDs for all outstanding requests. |
LDAPMessage |
getResponse()
Returns the response from an LDAP request. |
LDAPMessage |
getResponse(int msgid)
Returns the response from an LDAP request for a particular message ID. |
private LDAPMessage |
getResponse(java.lang.Integer msgid)
Private implementation of getResponse. |
boolean |
isComplete(int msgid)
Reports true if all results have been received for a particular message id. |
boolean |
isResponseReceived()
Reports true if any response has been received from the server and not yet retrieved with getResponse. |
boolean |
isResponseReceived(int msgid)
Reports true if a response has been received from the server for a particular message ID but not yet retrieved with getResponse. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
MessageAgent agent
java.lang.String name
static java.lang.Object nameLock
static int queueNum
Constructor Detail |
---|
LDAPMessageQueue(java.lang.String myname, MessageAgent agent)
agent
- The message agent to associate with this connecitonMethod Detail |
---|
java.lang.String getDebugName()
MessageAgent getMessageAgent()
public int[] getMessageIDs()
The last ID in the array is the messageID of the last submitted request.
public LDAPMessage getResponse() throws LDAPException
The getResponse method blocks until a response is available, or until all operations associated with the object have completed or been canceled, and then returns the response.
The application is responsible to determine the type of message returned.
LDAPException
- A general exception which includes an error
message and an LDAP error code.LDAPResponse
,
LDAPSearchResult
,
LDAPSearchResultReference
public LDAPMessage getResponse(int msgid) throws LDAPException
The getResponse method blocks until a response is available for a particular message ID, or until all operations associated with the object have completed or been canceled, and then returns the response. If there is no outstanding operation for the message ID (or if it is zero or a negative number), IllegalArgumentException is thrown.
The application is responsible to determine the type of message returned.
msgid
- query for responses for a specific message request
LDAPException
- A general exception which includes an error
message and an LDAP error code.LDAPResponse
,
LDAPSearchResult
,
LDAPSearchResultReference
private LDAPMessage getResponse(java.lang.Integer msgid) throws LDAPException
LDAPException
public boolean isResponseReceived()
getResponse()
public boolean isResponseReceived(int msgid)
msgid
- A particular message ID to query for available responses.
getResponse(int)
public boolean isComplete(int msgid)
If the search result done has been received from the server for the message id, it reports true. There may still be messages waiting to be retrieved by the applcation with getResponse.
java.lang.IllegalArgumentException
- if there is no outstanding operation
for the message ID,
|
All LDAP Classes Internal LDAP Classes |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |