public class ProgressReporter extends java.lang.Thread implements MultipartyNegotiationEventListener
Constructor and Description |
---|
ProgressReporter(int numNegotiations)
Initialize a new instance of the ProgressReporter class.
|
Modifier and Type | Method and Description |
---|---|
void |
handleEvent(NegotiationEvent e)
Increase progress counter
IMPORTANT: in handleEvent, do not more than just storing the event and
notifying your interface that a new event has arrived.
|
void |
interrupt()
Called when done with reporting progress.
|
void |
run()
Report progress to the System.out channel.
|
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
public ProgressReporter(int numNegotiations)
numNegotiations
- The total amount of negotiations to do. Progress will increase up to this number.public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
public void interrupt()
interrupt
in class java.lang.Thread
public void handleEvent(NegotiationEvent e)
handleEvent
in interface MultipartyNegotiationEventListener