|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--gov.sns.tools.correlator.PeriodicPoster
PerodicPoster is an auxiliary class for posting correlations periodically. Unlike the TimedBroadcaster, it strictly only posts the most recent best correlation within a given time interval. Other correlations within that same time period will be dropped. The poster will repeat forever until it is stopped.
| Field Summary | |
protected gov.sns.tools.correlator.PassiveBroadcaster |
broadcaster
|
protected Correlator |
correlator
|
protected javax.swing.Timer |
timer
|
| Constructor Summary | |
PeriodicPoster(Correlator aCorrelator,
double period)
Creates a new instance of PeriodicPoster |
|
| Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent event)
Implement ActionListener interface to rebroadcast the best correlation. |
void |
addCorrelationNoticeListener(CorrelationNotice listener)
Add the listener of re-broadcast correlation notices. |
void |
dispose()
Dispose of the poster |
Correlator |
getCorrelator()
Get the associated correlator |
double |
getPeriod()
Get the timer period |
boolean |
isRunning()
Determine if the poster is running |
void |
removeCorrelationNoticeListener(CorrelationNotice listener)
Remove the listener of re-broadcast correlations |
void |
restart()
Restart posting |
void |
setPeriod(double period)
Set the timer period |
void |
start()
Start the timer |
void |
stop()
Stop posting |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected Correlator correlator
protected gov.sns.tools.correlator.PassiveBroadcaster broadcaster
protected javax.swing.Timer timer
| Constructor Detail |
public PeriodicPoster(Correlator aCorrelator,
double period)
aCorrelator - The correlator providing the correlations.period - The posting period.| Method Detail |
public Correlator getCorrelator()
public double getPeriod()
public void setPeriod(double period)
period - The new timer period.public boolean isRunning()
public void start()
public void stop()
public void restart()
public void dispose()
public void addCorrelationNoticeListener(CorrelationNotice listener)
listener - A listener of the correlation notice.public void removeCorrelationNoticeListener(CorrelationNotice listener)
listener - A listener of the correlation notice.public void actionPerformed(java.awt.event.ActionEvent event)
actionPerformed in interface java.awt.event.ActionListenerevent - The timer event indicating that it is time to post a correlation.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||