Interface aglet.MessageManager
All Packages Class Hierarchy This Package Previous Next Index
Interface aglet.MessageManager
- public interface MessageManager
- extends Object
The MessageManager controls concurrency of incomming message.
Each kind of message can have a priority and will be queued in the
message queue in accordance with its priority.
- See Also:
- FutureReply, ReplySet
-
ACTIVATE_AGLET
- Used as a logical OR in the priority.
-
MAX_PRIORITY
- The maximum priority that the message can have.
-
MIN_PRIORITY
- The minimal priority that the message can have.
-
NORM_PRIORITY
- The default priority that is assigned to a message.
-
NOT_QUEUED
- Used as a argugment to the setPriority.
-
destroy()
- Destorys the manager.
-
exitMonitor()
- Exits the current monitor.
-
notifyAllMessages()
- Notifies all of waiting threads.
-
notifyMessage()
- Notifies a single waiting thread.
-
setPriority(String, int)
- Sets the message's priority.
-
waitMessage()
- Waits until it is notified.
-
waitMessage(long)
- Waits until it is notified or the timeout expires
NOT_QUEUED
public final static int NOT_QUEUED
- Used as a argugment to the setPriority. It indicates that
messages which have the same kind will not be queued in the
message queue and processed immediately.
- See Also:
- setPriority
ACTIVATE_AGLET
public final static int ACTIVATE_AGLET
- Used as a logical OR in the priority. It indicates that
receiving this kind of messages will automatically activate
the aglet if it had been deactivated.
getMessageManager().setPriority("wakeMeUp",
NORM_PRIORITY | ACTIVATE_AGLET);
- See Also:
- setPriority
MIN_PRIORITY
public final static int MIN_PRIORITY
- The minimal priority that the message can have.
- See Also:
- setPriority
NORM_PRIORITY
public final static int NORM_PRIORITY
- The default priority that is assigned to a message.
- See Also:
- setPriority
MAX_PRIORITY
public final static int MAX_PRIORITY
- The maximum priority that the message can have.
- See Also:
- setPriority
waitMessage
public abstract void waitMessage()
- Waits until it is notified.
- Throws: IllegalMonitorStateException
- If the current thread
is not the owner of the monitor.
- See Also:
- notifyMessage, notifyAllMessage
waitMessage
public abstract void waitMessage(long timeout)
- Waits until it is notified or the timeout expires
- Throws: IllegalMonitorStateException
- If the current thread
is not the owner of the monitor.
- See Also:
- waitMessage, notifyMessage, notifyAllMessage
notifyMessage
public abstract void notifyMessage()
- Notifies a single waiting thread.
- Throws: IllegalMonitorStateException
- If the current thread
is not the owner of the monitor.
- See Also:
- notifyMessage, waitMessage, notifyAllMessage
notifyAllMessages
public abstract void notifyAllMessages()
- Notifies all of waiting threads.
- Throws: IllegalMonitorStateException
- If the current thread
is not the owner of the monitor.
- See Also:
- notifyAllMessage, waitMessage, notifyMessage
exitMonitor
public abstract void exitMonitor()
- Exits the current monitor.
- See Also:
- exitMonitor, waitMessage, notifyMessage, notifyAllMessages
setPriority
public abstract void setPriority(String kind,
int priority)
- Sets the message's priority.
- Parameters:
- kind - the kind to set a priority
- priority - the priority
destroy
public abstract void destroy()
- Destorys the manager. After this calling, the message manager
is no longer valid and all queued and incoming message will
be denied.
All Packages Class Hierarchy This Package Previous Next Index