|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnetscape.ldap.LDAPMessageQueue
A queue of response messsages from the server. Multiple requests can be multiplexed on the same queue. For synchronous LDAPConnection requests, there will be only one request per queue. For asynchronous LDAPConnection requests, the user can add multiple request to the same queue. Superclass for LDAResponseListener and LDAPSearchListener
Field Summary | |
(package private) static long |
serialVersionUID
|
Constructor Summary | |
(package private) |
LDAPMessageQueue(boolean asynchOp)
Constructor |
Method Summary | |
(package private) void |
addMessage(LDAPMessage msg)
Queues the LDAP server's response. |
(package private) void |
addRequest(int id,
LDAPConnection connection,
LDAPConnThread connThread,
int timeLimit)
Registers a LDAP request |
(package private) LDAPResponse |
completeRequest()
Wait for request to complete. |
(package private) java.util.Vector |
getAllMessages()
Retrieves all messages currently in the queue without blocking |
(package private) LDAPConnection |
getConnection(int id)
Returns the connection associated with the specified request id |
(package private) LDAPConnThread |
getConnThread(int id)
Returns the connection thread associated with the specified request id |
int |
getMessageCount()
Returns the count of queued messages |
(package private) int |
getMessageID()
Returns message ID of the last request |
(package private) int[] |
getMessageIDs()
Returns a list of message IDs for all outstanding requests |
int |
getRequestCount()
Returns the number of outstanding requests. |
(package private) boolean |
isAsynchOp()
Returns a flag whether the listener is used for asynchronous LDAP operations |
(package private) boolean |
isMessageReceived()
Checks if response message is received. |
(package private) void |
merge(LDAPMessageQueue mq2)
Merge two message queues. |
(package private) LDAPMessage |
nextMessage()
Blocks until a response is available or until all operations associated with the object have completed or been canceled. |
(package private) int |
removeAllRequests(LDAPConnThread connThread)
Remove all requests associated with the specified connThread Called when a connThread has a network error |
(package private) boolean |
removeRequest(int id)
Remove request with the specified ID Called when a LDAP operation is abandoned (called from LDAPConnThread), or terminated (called by nextMessage() when LDAPResponse message is received) |
(package private) void |
reset()
Resets the state of this object, so it can be recycled. |
(package private) void |
setException(LDAPConnThread connThread,
LDAPException e)
Signals that a network exception occured while servicing the request. |
java.lang.String |
toString()
String representation of the object |
(package private) void |
waitFirstMessage()
Blocks until a response is available. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
static final long serialVersionUID
Constructor Detail |
LDAPMessageQueue(boolean asynchOp)
asynchOp
- a boolean flag that is true if the object is used
for asynchronous LDAP operationsLDAPAsynchronousConnection
Method Detail |
boolean isAsynchOp()
LDAPAsynchronousConnection
void waitFirstMessage() throws LDAPException
LDAPException
- Network error exception
LDAPInterruptedException
- The invoking thread was interruptedLDAPMessage nextMessage() throws LDAPException
LDAPException
- Network error exception
LDAPInterruptedException
- The invoking thread was interruptedLDAPResponse completeRequest() throws LDAPException
LDAPException
- Network error exception
LDAPInterruptedException
- The invoking thread was interruptedvoid merge(LDAPMessageQueue mq2)
mq2
- message queue to merge with this onejava.util.Vector getAllMessages()
void addMessage(LDAPMessage msg)
msg
- response messagevoid setException(LDAPConnThread connThread, LDAPException e)
connThread
- LDAPConnThread on which the exception occurrede
- exceptionboolean isMessageReceived()
public int getMessageCount()
void reset()
LDAPConnection.getResponseListener()
,
netscape.ldap.LDAPConnection#getSearchListener
LDAPConnection getConnection(int id)
id
- request id
LDAPConnThread getConnThread(int id)
id
- request id.
int getMessageID()
int[] getMessageIDs()
void addRequest(int id, LDAPConnection connection, LDAPConnThread connThread, int timeLimit)
id
- LDAP request message IDconnection
- LDAP Connection for the message IDconnThread
- a physical connection to the servertimeLimit
- the maximum number of milliseconds to wait for
the request to completepublic int getRequestCount()
boolean removeRequest(int id)
int removeAllRequests(LDAPConnThread connThread)
public java.lang.String toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |