cgl.narada.wsinfra.wsrm.impl
Class WsrmSequenceMonitorImpl

java.lang.Object
  extended by java.lang.Thread
      extended by cgl.narada.wsinfra.wsrm.impl.WsrmSequenceMonitorImpl
All Implemented Interfaces:
WsrmSequenceMonitor, Runnable

public class WsrmSequenceMonitorImpl
extends Thread
implements WsrmSequenceMonitor

This processor processes Sequences and determines if (a) Acknowledgements/Retransmissions need to be issued. (b) See if the Inactivity timeout on a sequence has expired, if so proceed to terminate the sequence.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
protected WsrmSequenceMonitorImpl(String configInfo, WsMessageFlow wsMessageFlow)
           
 
Method Summary
 boolean checkIfMessagesAvailable(WsrmSequenceInfo wsrmSequenceInfo)
          Checks to see if any messages have been stored for this sequence in question.
 boolean checkInactivityTimeout(WsrmSequenceInfo wsrmSequenceInfo)
          Checks to see if the inactivity interval has expired on the sequence in question.
 void checkToIssueAcknowledgements(WsrmSequenceInfo wsrmSequenceInfo)
          This method checks to see if acknowledgements should be issued on a specific sequence.
 void checkToIssueRetransmissions(WsrmSequenceInfo wsrmSequenceInfo)
          This method checks to see if retransmissions need to be issued on the specified sequence.
 void run()
           
 void startServices()
          Begin services related to sequence monitoring viz.
 void stopServices()
          Stop services related to sequence monitoring.
 
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WsrmSequenceMonitorImpl

protected WsrmSequenceMonitorImpl(String configInfo,
                                  WsMessageFlow wsMessageFlow)
                           throws WsrmStorageException
Throws:
WsrmStorageException
Method Detail

startServices

public void startServices()
Begin services related to sequence monitoring viz. issue acknowledgements and initiate retransmissions for sequences.

Specified by:
startServices in interface WsrmSequenceMonitor

stopServices

public void stopServices()
Stop services related to sequence monitoring.

Specified by:
stopServices in interface WsrmSequenceMonitor

run

public void run()
Specified by:
run in interface Runnable
Overrides:
run in class Thread

checkInactivityTimeout

public boolean checkInactivityTimeout(WsrmSequenceInfo wsrmSequenceInfo)
                               throws WsrmStorageException
Checks to see if the inactivity interval has expired on the sequence in question.

Specified by:
checkInactivityTimeout in interface WsrmSequenceMonitor
Throws:
WsrmStorageException

checkIfMessagesAvailable

public boolean checkIfMessagesAvailable(WsrmSequenceInfo wsrmSequenceInfo)
                                 throws WsrmStorageException
Checks to see if any messages have been stored for this sequence in question.

Specified by:
checkIfMessagesAvailable in interface WsrmSequenceMonitor
Throws:
WsrmStorageException

checkToIssueAcknowledgements

public void checkToIssueAcknowledgements(WsrmSequenceInfo wsrmSequenceInfo)
                                  throws MessageFlowException,
                                         WsrmStorageException
This method checks to see if acknowledgements should be issued on a specific sequence. If there is a neeed to do so, it proceeds to issue acknowledgements on the sequence.

Specified by:
checkToIssueAcknowledgements in interface WsrmSequenceMonitor
Throws:
MessageFlowException
WsrmStorageException

checkToIssueRetransmissions

public void checkToIssueRetransmissions(WsrmSequenceInfo wsrmSequenceInfo)
                                 throws WsrmStorageException,
                                        MessageFlowException
This method checks to see if retransmissions need to be issued on the specified sequence. If a need arises retransmissions are issued and the retransmission interval is reset. There should also be a way to ensure exponential backoff.

Specified by:
checkToIssueRetransmissions in interface WsrmSequenceMonitor
Throws:
WsrmStorageException
MessageFlowException


For comments and suggestions please send e-mail to The NaradaBrokering Project