com.algosome.common.util
Class NotificationThread

java.lang.Object
  extended by com.algosome.common.util.NotificationThread
All Implemented Interfaces:
java.lang.Runnable

public abstract class NotificationThread
extends java.lang.Object
implements java.lang.Runnable

Runnable implementation which allows Listeners to be added to the class and listen for events within the run method (started, finished, etc...)

Author:
Greg Cope

Constructor Summary
NotificationThread()
           
 
Method Summary
 void addListener(ThreadListener list)
          Adds the parameter listener
abstract  void doRun()
          Abstract method called from run() after notification of all listeners that the thread has started.
 java.util.List<ThreadListener> getListeners()
          Retrieves all listeners.
 void removeListener(ThreadListener list)
          Removes the parameter listener.
 void run()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NotificationThread

public NotificationThread()
Method Detail

run

public void run()
Specified by:
run in interface java.lang.Runnable

doRun

public abstract void doRun()
Abstract method called from run() after notification of all listeners that the thread has started.


addListener

public void addListener(ThreadListener list)
Adds the parameter listener

Parameters:
list -

removeListener

public void removeListener(ThreadListener list)
Removes the parameter listener.

Parameters:
list -

getListeners

public java.util.List<ThreadListener> getListeners()
Retrieves all listeners.

Returns: