public class PeriodicPoster<RecordType>
extends java.lang.Object
implements java.awt.event.ActionListener
Constructor and Description |
---|
PeriodicPoster(Correlator<?,RecordType,? extends SourceAgent<RecordType>> aCorrelator,
double period)
Creates a new instance of PeriodicPoster
|
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent event)
Implement ActionListener interface to rebroadcast the best correlation.
|
void |
addCorrelationNoticeListener(CorrelationNotice<RecordType> listener)
Add the listener of re-broadcast correlation notices.
|
void |
dispose()
Dispose of the poster
|
Correlator<?,RecordType,? extends SourceAgent<RecordType>> |
getCorrelator()
Get the associated correlator
|
double |
getPeriod()
Get the timer period
|
boolean |
isRunning()
Determine if the poster is running
|
void |
removeCorrelationNoticeListener(CorrelationNotice<RecordType> 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
|
public PeriodicPoster(Correlator<?,RecordType,? extends SourceAgent<RecordType>> aCorrelator, double period)
aCorrelator
- The correlator providing the correlations.period
- The posting period.public Correlator<?,RecordType,? extends SourceAgent<RecordType>> 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<RecordType> listener)
listener
- A listener of the correlation notice.public void removeCorrelationNoticeListener(CorrelationNotice<RecordType> listener)
listener
- A listener of the correlation notice.public void actionPerformed(java.awt.event.ActionEvent event)
actionPerformed
in interface java.awt.event.ActionListener
event
- The timer event indicating that it is time to post a correlation.