|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--gov.sns.tools.correlator.SourceAgent
Generator manages a single channel. It performs any setup, monitors the channel and it manages a circular buffer of bin agents that gather correlated events.
| Field Summary | |
protected java.lang.String |
_name
|
protected gov.sns.tools.correlator.BinUpdate |
binUpdateProxy
|
protected MessageCenter |
localCenter
|
| Constructor Summary | |
SourceAgent(MessageCenter newLocalCenter,
java.lang.String name,
RecordFilter recordFilter,
CorrelationTester tester)
Creates new ChannelAgent |
|
| Method Summary | |
void |
binTimespanChanged(Correlator sender,
double newTimespan)
Handle the bin timespan changed event. |
void |
correlationFilterChanged(Correlator sender,
CorrelationFilter newFilter)
Implement StateNotice interface to listen for change of state |
java.lang.String |
name()
Name of the managed source |
protected void |
postEvent(java.lang.Object record,
double timestamp)
This method is used to advertise a new event record received by the event handler of the SourceAgent subclass. |
void |
reset()
clear memory of all events |
void |
setBinTimespan(double timespan)
set the timespan to each bin |
protected abstract void |
setupEventHandler(RecordFilter recordFilter)
Subclasses implement this method to handle the monitoring of its sources in a way specific to the particular SourceAgent subclass. |
protected void |
shutdown()
shutdown this channel agent and remove itself |
void |
sourceAdded(Correlator sender,
java.lang.String name,
int newCount)
Handle the source added event. |
void |
sourceRemoved(Correlator sender,
java.lang.String name,
int newCount)
Handle the source removed event. |
abstract boolean |
startMonitor()
Start monitoring the channel |
abstract void |
stopMonitor()
Stop monitoring the channel |
void |
willStartMonitoring(Correlator sender)
Handle the advance notice of the correlator starting. |
void |
willStopMonitoring(Correlator sender)
Handle the advance notice of the correlator stopping. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected java.lang.String _name
protected MessageCenter localCenter
protected gov.sns.tools.correlator.BinUpdate binUpdateProxy
| Constructor Detail |
public SourceAgent(MessageCenter newLocalCenter,
java.lang.String name,
RecordFilter recordFilter,
CorrelationTester tester)
| Method Detail |
protected abstract void setupEventHandler(RecordFilter recordFilter)
postEvent(java.lang.Object, double)public void reset()
public void setBinTimespan(double timespan)
protected final void postEvent(java.lang.Object record,
double timestamp)
public java.lang.String name()
public abstract boolean startMonitor()
public abstract void stopMonitor()
protected void shutdown()
public void sourceAdded(Correlator sender,
java.lang.String name,
int newCount)
gov.sns.tools.correlator.StateNotice
sourceAdded in interface gov.sns.tools.correlator.StateNoticesender - The correlator to which the source has been added.name - The name identifying the new source.newCount - The new number of sources correlated.
public void sourceRemoved(Correlator sender,
java.lang.String name,
int newCount)
gov.sns.tools.correlator.StateNotice
sourceRemoved in interface gov.sns.tools.correlator.StateNoticesender - The correlator from which the source has been removed.name - The name identifying the new source.newCount - The new number of sources correlated.
public void binTimespanChanged(Correlator sender,
double newTimespan)
gov.sns.tools.correlator.StateNotice
binTimespanChanged in interface gov.sns.tools.correlator.StateNoticesender - The correlator whose timespan bin has changed.newTimespan - The new timespan used by the correlator.public void willStopMonitoring(Correlator sender)
gov.sns.tools.correlator.StateNotice
willStopMonitoring in interface gov.sns.tools.correlator.StateNoticesender - The correlator that will stop.public void willStartMonitoring(Correlator sender)
gov.sns.tools.correlator.StateNotice
willStartMonitoring in interface gov.sns.tools.correlator.StateNoticesender - The correlator that will start.
public void correlationFilterChanged(Correlator sender,
CorrelationFilter newFilter)
correlationFilterChanged in interface gov.sns.tools.correlator.StateNoticesender - The correlator whose correlation filter has changed.newFilter - The new correlation filter to use.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||