|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
The MessageManager controls concurrency of incomming message. Each kind of message can have a priority and will be placed in the message queue in accordance with its priority.
FutureReply,
ReplySet| Field Summary | |
static int |
ACTIVATE_AGLET
Used as a logical OR in the priority. |
static int |
MAX_PRIORITY
The maximum priority that the message can have. |
static int |
MIN_PRIORITY
The minimal priority that the message can have. |
static int |
NORM_PRIORITY
The default priority that is assigned to a message. |
static int |
NOT_QUEUED
Used as a argugment to the setPriority. |
| Method Summary | |
void |
destroy()
Destorys the manager. |
void |
exitMonitor()
Exits the current monitor. |
void |
notifyAllMessages()
Notifies all of waiting threads. |
void |
notifyMessage()
Notifies a single waiting thread. |
void |
setPriority(java.lang.String kind,
int priority)
Sets the message's priority. |
void |
waitMessage()
Waits until it is notified. |
void |
waitMessage(long timeout)
Waits until it is notified or the timeout expires. |
| Field Detail |
public static final int NOT_QUEUED
setPriority(java.lang.String, int)public static final int ACTIVATE_AGLET
getMessageManager().setPriority("wakeMeUp",
NORM_PRIORITY | ACTIVATE_AGLET);
setPriority(java.lang.String, int)public static final int MIN_PRIORITY
setPriority(java.lang.String, int)public static final int NORM_PRIORITY
setPriority(java.lang.String, int)public static final int MAX_PRIORITY
setPriority(java.lang.String, int)| Method Detail |
public void waitMessage()
notifyMessage,
notifyAllMessagespublic void waitMessage(long timeout)
timeout - the maximum time to wait in milliseconds.Aglet.waitMessage(),
notifyMessage,
notifyAllMessagespublic void notifyMessage()
Aglet.notifyMessage(),
waitMessage,
notifyAllMessagespublic void notifyAllMessages()
Aglet.notifyAllMessages(),
waitMessage,
notifyMessagepublic void exitMonitor()
Aglet.exitMonitor(),
waitMessage,
notifyMessage,
notifyAllMessages
public void setPriority(java.lang.String kind,
int priority)
kind - the kind to set a prioritypriority - the prioritypublic void destroy()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||