|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Thread
org.apache.sandesha2.workers.SandeshaThread
public abstract class SandeshaThread
Aggregates pause and stop logic between sender and invoker threads.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
| Field Summary | |
|---|---|
protected org.apache.axis2.context.ConfigurationContext |
context
|
protected StorageManager |
storageManager
|
protected org.apache.axis2.util.threadpool.ThreadFactory |
threadPool
|
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
SandeshaThread(int sleepTime)
|
|
| Method Summary | |
|---|---|
void |
blockForPause()
Waits for the invoking thread to pause |
protected void |
doPauseIfNeeded()
|
void |
finishPause()
|
java.util.ArrayList<SequenceEntry> |
getSequences()
|
WorkerLock |
getWorkerLock()
|
protected boolean |
hasStoppedRunning()
|
protected abstract boolean |
internalRun()
The main work loop, to be implemented by any child class. |
boolean |
isThreadStarted()
|
void |
run()
|
protected boolean |
runMainLoop()
Test to check if a notify has been called when not waiting |
void |
runThreadForSequence(org.apache.axis2.context.ConfigurationContext context,
java.lang.String sequenceID,
boolean rmSource)
Ensure that the worker thread is aware of the given sequence. |
void |
setRanMainLoop()
Indicate that the main loop has been run |
void |
stopRunning()
|
void |
stopThreadForSequence(java.lang.String sequenceID,
boolean rmSource)
|
void |
wakeThread()
Wake the current thread as there is work to be done. |
| Methods inherited from class java.lang.Thread |
|---|
activeCount, checkAccess, clone, 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, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected transient org.apache.axis2.util.threadpool.ThreadFactory threadPool
protected org.apache.axis2.context.ConfigurationContext context
protected StorageManager storageManager
| Constructor Detail |
|---|
public SandeshaThread(int sleepTime)
| Method Detail |
|---|
public final WorkerLock getWorkerLock()
public void stopThreadForSequence(java.lang.String sequenceID,
boolean rmSource)
public void blockForPause()
public void finishPause()
public void stopRunning()
public boolean isThreadStarted()
public void runThreadForSequence(org.apache.axis2.context.ConfigurationContext context,
java.lang.String sequenceID,
boolean rmSource)
public java.util.ArrayList<SequenceEntry> getSequences()
protected boolean hasStoppedRunning()
protected void doPauseIfNeeded()
public void wakeThread()
public void setRanMainLoop()
protected boolean runMainLoop()
protected abstract boolean internalRun()
public void run()
run in interface java.lang.Runnablerun in class java.lang.Thread
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||