|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.Observable org.entityfs.util.obs.polling.TimerTicker
public final class TimerTicker
This is a ticker that uses a java.util.Timer
to schedule polls. It
can be used by PollingDirectoryMonitorer
.
The ticker is not started until start
is called.
The ticker deals with RuntimeException
:s from its Observer
:s
by logging them. If a log adapter holder is set via
setLogAdapterHolder(LogAdapterHolder)
, it is used for logging. If no
log adapter holder is set, errors are logged to stderr.
PollingDirectoryMonitorer
Field Summary | |
---|---|
LogAdapterHolder |
m_logAdapterHolder
|
Constructor Summary | |
---|---|
TimerTicker(long intervalMSecs)
Create a timer ticker. |
|
TimerTicker(long t,
TimeUnit tu)
Create a timer ticker. |
Method Summary | |
---|---|
void |
setLogAdapterHolder(LogAdapterHolder lah)
Set a log adapter holder to use for logging errors from observers. |
void |
start()
Start the timer ticker. |
void |
stop()
Stop the timer ticker. |
Methods inherited from class java.util.Observable |
---|
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public LogAdapterHolder m_logAdapterHolder
Constructor Detail |
---|
public TimerTicker(long intervalMSecs)
intervalMSecs
- The tick interval in milliseconds.public TimerTicker(long t, TimeUnit tu)
t
- The tick interval.tu
- The time unit for the tick interval.Method Detail |
---|
public void setLogAdapterHolder(LogAdapterHolder lah)
start()
:ing the ticker.
lah
- The log adapter holder.public void start()
public void stop()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |