fr.esrf.tangoatk.core
Class Refresher

java.lang.Object
  extended by java.lang.Thread
      extended by fr.esrf.tangoatk.core.Refresher
All Implemented Interfaces:
java.io.Serializable, java.lang.Runnable

public class Refresher
extends java.lang.Thread
implements java.io.Serializable

ARefresher is used as a base class to implement refreshers of IRefreshees. Refreshers are Threads which calls the IEntityCollections refresh method.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
protected static java.lang.ThreadGroup refreshers
           
 boolean running
           
 boolean stop
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
Refresher()
           
Refresher(java.lang.String s)
           
 
Method Summary
 java.lang.Thread addRefreshee(IRefreshee e)
          addRefreshee is used by the refreshee to add itself to the ARefresher.
 IRefreshee getRefreshee()
           
 long getRefreshInterval()
           
 java.lang.String getVersion()
           
 boolean isRunning()
           
 boolean isSynchronizedPeriod()
          To know wheather the period is resynchronized or not
 boolean isTraceUnexpected()
          To know wheather unexpected exceptions are traced or not
 void run()
           
 void setRefreshee(IRefreshee refreshee)
           
 void setRefreshInterval(long milliSeconds)
           
 void setSynchronizedPeriod(boolean synchronizedP)
          To synchronize or not the refreshing period.
 void setTraceUnexpected(boolean trace)
          To trace or not unexpected Exceptions.
 void start()
           
 void stopRunning()
           
 
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, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

stop

public boolean stop

running

public boolean running

refreshers

protected static java.lang.ThreadGroup refreshers
Constructor Detail

Refresher

public Refresher()

Refresher

public Refresher(java.lang.String s)
Method Detail

setRefreshInterval

public void setRefreshInterval(long milliSeconds)

getRefreshInterval

public long getRefreshInterval()

start

public void start()
Overrides:
start in class java.lang.Thread

stopRunning

public void stopRunning()

isRunning

public boolean isRunning()

run

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

addRefreshee

public java.lang.Thread addRefreshee(IRefreshee e)
addRefreshee is used by the refreshee to add itself to the ARefresher. This method returns its Thread so that the IRefreshee implementator can write refrehser.addRefreshee(this).start();

Parameters:
e - an IRefreshee value
Returns:
a Thread value

getVersion

public java.lang.String getVersion()

setSynchronizedPeriod

public void setSynchronizedPeriod(boolean synchronizedP)
To synchronize or not the refreshing period.

Parameters:
synchronizedP - 21 dec. 2005

isSynchronizedPeriod

public boolean isSynchronizedPeriod()
To know wheather the period is resynchronized or not

Returns:
21 dec. 2005

setTraceUnexpected

public void setTraceUnexpected(boolean trace)
To trace or not unexpected Exceptions.

Parameters:
synchronizedP - 21 dec. 2005

isTraceUnexpected

public boolean isTraceUnexpected()
To know wheather unexpected exceptions are traced or not

Returns:
21 dec. 2005

getRefreshee

public IRefreshee getRefreshee()

setRefreshee

public void setRefreshee(IRefreshee refreshee)