mam.transaction
Class MessageWaiter
java.lang.Object
|
+--java.lang.Thread
|
+--mam.transaction.MessageWaiter
- public class MessageWaiter
- extends Thread
Fields inherited from class java.lang.Thread |
MIN_PRIORITY, NORM_PRIORITY, MAX_PRIORITY |
Constructor Summary |
MessageWaiter(String identifier, Collection originalMessages, Collection sentMessages, boolean exitAfterQuota) |
MessageWaiter(String identifier, Collection originalMessages, Collection sentMessages, long timeOut, long updatePeriod, boolean exitAfterQuota) |
Methods inherited from class java.lang.Thread |
currentThread, yield, sleep, sleep, start, stop, stop, interrupt, interrupted, isInterrupted, destroy, isAlive, suspend, resume, setPriority, getPriority, setName, getName, getThreadGroup, activeCount, enumerate, countStackFrames, join, join, join, dumpStack, setDaemon, isDaemon, checkAccess, toString, getContextClassLoader, setContextClassLoader |
Methods inherited from class java.lang.Object |
getClass, hashCode, equals, clone, notify, notifyAll, wait, wait, wait, finalize |
DEFAULT_TIME_OUT
public final static long DEFAULT_TIME_OUT
DEFAULT_UPDATE_PERIOD
public final static long DEFAULT_UPDATE_PERIOD
Log
static Category Log
m_allResponses
private Collection m_allResponses
m_done
private boolean m_done
m_exitAfterQuota
private boolean m_exitAfterQuota
m_expirationDate
private Date m_expirationDate
m_identifier
private Serializable m_identifier
m_listeners
private Collection m_listeners
m_originalMessages
private Collection m_originalMessages
m_recentResponses
private Collection m_recentResponses
m_sentMessageIds
private Map m_sentMessageIds
m_sentMessages
private Collection m_sentMessages
m_updatePeriod
private long m_updatePeriod
m_valid
private boolean m_valid
MessageWaiter
public MessageWaiter(String identifier, Collection originalMessages, Collection sentMessages, boolean exitAfterQuota)
MessageWaiter
public MessageWaiter(String identifier, Collection originalMessages, Collection sentMessages, long timeOut, long updatePeriod, boolean exitAfterQuota)
addListener
public synchronized void addListener(MessageWaiterListener newListener)
addResponse
protected synchronized void addResponse(AgentMessage newResponse)
evaluateMessage
public boolean evaluateMessage(AgentMessage incomingMessage)
finished
protected void finished()
getAllResponses
public synchronized Collection getAllResponses()
getDone
public boolean getDone()
getExitAfterQuota
public boolean getExitAfterQuota()
getExpirationDate
public Date getExpirationDate()
getIdentifier
public Serializable getIdentifier()
getListeners
protected Collection getListeners()
getOriginalMessages
public synchronized Collection getOriginalMessages()
getRecentResponses
public Collection getRecentResponses()
getSentMessages
public synchronized Collection getSentMessages()
getUpdatePeriod
public long getUpdatePeriod()
invalidateRecentResponses
protected void invalidateRecentResponses()
isExpired
protected boolean isExpired()
isMissingResponses
public boolean isMissingResponses()
notifyListeners
protected synchronized void notifyListeners()
run
public void run()
setExitAfterQuota
public void setExitAfterQuota(boolean exitAfterQuota)
setIdentifier
protected void setIdentifier(Serializable identifier)
setTimeOut
protected synchronized void setTimeOut(long timeOut)
setUpdatePeriod
public synchronized void setUpdatePeriod(long updatePeriod)
signalDone
public void signalDone()
updateQuota
protected void updateQuota()