|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--gov.sns.tools.correlator.Correlator
The Correlator is the class that is used to setup monitoring of correlated events. It is the sole entry point to the outside world. When correlations are found, the Correlator broadcasts the correlation. Note that all time is in seconds unless otherwise stated.
| Field Summary | |
protected double |
_binTimespan
|
protected CorrelationTester |
correlationTester
|
protected MessageCenter |
localCenter
|
| Constructor Summary | |
Correlator(double aBinTimespan)
Creates new Correlator |
|
Correlator(double aBinTimespan,
CorrelationFilter aFilter)
Correlator constructor |
|
| Method Summary | |
void |
addListener(CorrelationNotice listener)
Register the listener as a receiver of Correlation notices from this correlator. |
protected void |
addSource(java.lang.Object source,
java.lang.String sourceName)
Add a source to monitor. |
protected void |
addSource(java.lang.Object source,
java.lang.String sourceName,
RecordFilter recordFilter)
Add a source to monitor. |
double |
binTimespan()
maximum time span allowed for events to be considered correlated |
void |
dispose()
Dispose of the correlator and its overhead |
Correlation |
fetchCorrelationWithTimeout(double aTimeout)
fetchCorrelationWithTimeout() is a convenience method that
allows the user a simple way to fetch a correlation without handling
events and implementing a listener. |
java.util.Collection |
getNamesOfSources()
Get all the names of all the sources managed by this correlator |
protected java.util.Collection |
getSourceAgents()
Get all of the channel agents managed by this correlator |
boolean |
hasSource(java.lang.String sourceName)
See if we already manage this channel |
boolean |
isRunning()
Determine if the correlator is running |
void |
monitorWithTimeout(double timeout)
Monitor and post the best partial correlation if the timeout is exceeded. |
protected abstract SourceAgent |
newSourceAgent(java.lang.Object source,
java.lang.String sourceName,
RecordFilter recordFilter)
|
int |
numSources()
Number of channels being managed |
void |
pulseMonitorWithTimeout(double timeout)
Monitor until the timeout or until a complete correlation is found |
protected void |
registerEvents()
Register for notices. |
void |
removeAllSources()
Stop managing all registered sources |
void |
removeListener(CorrelationNotice listener)
Unregister the listener as a receiver of Correlation notices from this correlator. |
void |
removeSource(java.lang.String sourceName)
Stop managing the specified source. |
void |
setBinTimespan(double timespan)
Set the maximum time span allowed for events to be considered correlated |
void |
setCorrelationFilter(CorrelationFilter newFilter)
Set the correlation filter to the one specified. |
void |
startMonitoring()
Start monitoring the managed sources. |
void |
stopMonitoring()
Stop monitoring the managed sources. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected MessageCenter localCenter
protected double _binTimespan
protected CorrelationTester correlationTester
| Constructor Detail |
public Correlator(double aBinTimespan)
public Correlator(double aBinTimespan,
CorrelationFilter aFilter)
| Method Detail |
protected void registerEvents()
public void addListener(CorrelationNotice listener)
public void removeListener(CorrelationNotice listener)
public double binTimespan()
public void setBinTimespan(double timespan)
public void setCorrelationFilter(CorrelationFilter newFilter)
newFilter - The correlation filter to use.protected java.util.Collection getSourceAgents()
public java.util.Collection getNamesOfSources()
public int numSources()
public boolean hasSource(java.lang.String sourceName)
protected void addSource(java.lang.Object source,
java.lang.String sourceName)
protected void addSource(java.lang.Object source,
java.lang.String sourceName,
RecordFilter recordFilter)
protected abstract SourceAgent newSourceAgent(java.lang.Object source,
java.lang.String sourceName,
RecordFilter recordFilter)
public void removeSource(java.lang.String sourceName)
public void removeAllSources()
public void pulseMonitorWithTimeout(double timeout)
timeout - time to wait in secondspublic void monitorWithTimeout(double timeout)
timeout - time to wait in secondspublic void startMonitoring()
public void stopMonitoring()
public boolean isRunning()
public void dispose()
public Correlation fetchCorrelationWithTimeout(double aTimeout)
fetchCorrelationWithTimeout() is a convenience method that
allows the user a simple way to fetch a correlation without handling
events and implementing a listener. The method spawns a fetch and
blocks until a correlation is retrieved or the timeout has expired.
The resulting correlation is returned. If no correlation was found
within the timeout, null is returned.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||