|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
unsw.cse.mica.blackboard.QueuedMessageSender
public class QueuedMessageSender
A messaging buffer that enqueues incoming message and handles each one sequentially using an internal thread. This helps to retain interactivity for the blackboard when sending mobs.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Field Summary |
---|
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
QueuedMessageSender(BlackboardMessageSender sender)
Create a new QueuedMessageSender that sends to the given sender. |
Method Summary | |
---|---|
void |
run()
The internal thread run method. |
void |
sendDeletedMob(java.lang.String agentName,
Mob mob)
Send a deleted mob to the given agent. |
void |
sendNewMob(java.lang.String agentName,
Mob mob)
Send a new mob to the given agent. |
void |
sendReplacedMob(java.lang.String agentName,
Mob oldMob,
Mob newMob)
Send a replaced mob to the given agent. |
void |
sendTypeManagerChanged(java.lang.String agentName)
Send a thpe manager changed message to the given agent. |
void |
terminate()
Terminate the thread. |
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public QueuedMessageSender(BlackboardMessageSender sender)
sender
- Method Detail |
---|
public void sendNewMob(java.lang.String agentName, Mob mob)
sendNewMob
in interface BlackboardMessageSender
agentName
- the name of the agent for which the message is intenededmob
- the mob associated with this messagepublic void sendDeletedMob(java.lang.String agentName, Mob mob)
sendDeletedMob
in interface BlackboardMessageSender
agentName
- the name of the agent for which the message is intenededmob
- the mob associated with this messagepublic void sendReplacedMob(java.lang.String agentName, Mob oldMob, Mob newMob)
sendReplacedMob
in interface BlackboardMessageSender
agentName
- the name of the agent for which the message is intenededoldMob
- the oldMob associated with this messagenewMob
- the newMob associated with this messagepublic void sendTypeManagerChanged(java.lang.String agentName)
sendTypeManagerChanged
in interface BlackboardMessageSender
agentName
- the name of the agent for which the message is intenededpublic void terminate()
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |