All LDAP Classes
Internal LDAP Classes

com.novell.ldap
Class MessageAgent

java.lang.Object
  extended by com.novell.ldap.MessageAgent

 class MessageAgent
extends java.lang.Object


Field Summary
private static int agentNum
           
private  int indexLastRead
           
private  MessageVector messages
           
private  java.lang.String name
           
private static java.lang.Object nameLock
           
 
Constructor Summary
MessageAgent()
           
 
Method Summary
(package private)  void abandon(int msgId, LDAPConstraints cons)
          Abandon the request associated with MsgId
(package private)  void abandonAll()
          Abandon all requests on this MessageAgent
private  void debugDisplayMessages()
          Debug code to print messages in message vector
(package private)  java.lang.String getAgentName()
          Get the maessage agent number for debugging
(package private)  int getCount()
          Get a count of all messages queued
(package private)  java.lang.Object getLDAPMessage(java.lang.Integer msgId)
          Returns a response queued, or waits if none queued
(package private)  Message getMessage(int msgid)
          Returns the Message object for a given messageID
(package private)  java.lang.Object[] getMessageArray()
          empty and return all messages owned by this agent
(package private)  int[] getMessageIDs()
          Get a list of message ids controlled by this agent
(package private)  boolean isComplete(int msgid)
          Indicates whether a specific operation is complete
(package private)  boolean isResponseReceived()
          Returns true if any responses are queued for any of the agent's messages return false if no responses are queued, otherwise true
(package private)  boolean isResponseReceived(int msgId)
          Returns true if any responses are queued for the specified msgId return false if no responses are queued, otherwise true
(package private)  void merge(MessageAgent fromAgent)
          merges two message agents
(package private)  void sendMessage(Connection conn, LDAPMessage msg, int timeOut, LDAPMessageQueue queue, BindProperties bindProps)
          Send a request to the server.
(package private)  void sleepersAwake(boolean all)
          Wakes up any threads waiting for messages in the message agent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

messages

private MessageVector messages

indexLastRead

private int indexLastRead

nameLock

private static java.lang.Object nameLock

agentNum

private static int agentNum

name

private java.lang.String name
Constructor Detail

MessageAgent

MessageAgent()
Method Detail

getMessageArray

java.lang.Object[] getMessageArray()
empty and return all messages owned by this agent


merge

final void merge(MessageAgent fromAgent)
merges two message agents

Parameters:
fromAgent - the agent to be merged into this one

sleepersAwake

final void sleepersAwake(boolean all)
Wakes up any threads waiting for messages in the message agent


isResponseReceived

final boolean isResponseReceived()
Returns true if any responses are queued for any of the agent's messages return false if no responses are queued, otherwise true


isResponseReceived

final boolean isResponseReceived(int msgId)
Returns true if any responses are queued for the specified msgId return false if no responses are queued, otherwise true


abandon

final void abandon(int msgId,
                   LDAPConstraints cons)
Abandon the request associated with MsgId

Parameters:
msgId - the message id to abandon

cons - constraints associated with this request

abandonAll

final void abandonAll()
Abandon all requests on this MessageAgent


getMessageIDs

final int[] getMessageIDs()
Get a list of message ids controlled by this agent

Returns:
an array of integers representing the message ids

isComplete

final boolean isComplete(int msgid)
Indicates whether a specific operation is complete

Returns:
true if a specific operation is complete

getMessage

final Message getMessage(int msgid)
                  throws java.lang.NoSuchFieldException
Returns the Message object for a given messageID

Parameters:
msgid - the message ID.
Throws:
java.lang.NoSuchFieldException

sendMessage

final void sendMessage(Connection conn,
                       LDAPMessage msg,
                       int timeOut,
                       LDAPMessageQueue queue,
                       BindProperties bindProps)
                throws LDAPException
Send a request to the server. A Message class is created for the specified request which causes the message to be sent. The request is added to the list of messages being managed by this agent.

Parameters:
conn - the connection that identifies the server.

msg - the LDAPMessage to send

timeOut - the interval to wait for the message to complete or null if infinite.
queue - the LDAPMessageQueue associated with this request.
Throws:
LDAPException

getLDAPMessage

final java.lang.Object getLDAPMessage(java.lang.Integer msgId)
Returns a response queued, or waits if none queued


getAgentName

java.lang.String getAgentName()
Get the maessage agent number for debugging

Returns:
the agent number

getCount

int getCount()
Get a count of all messages queued


debugDisplayMessages

private void debugDisplayMessages()
Debug code to print messages in message vector


All LDAP Classes
Internal LDAP Classes

Copyright ? 2002 Novell, Inc. All Rights Reserved.
Novell, Inc.
1800 South Novell Place
Provo, Ut 84606
Phone: (801) 861-5000