Package xal.ca.correlator
Class ChannelAgent
ChannelAgent manages a single channel. It performs any setup, monitors the
channel and it manages a circular buffer of bin agents that gather correlated
events.
- Author:
- tap
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classHandle the monitor eventsprotected classHandle the Monitor events and filter the events according to the suppliedChannelRecordFilter. -
Field Summary
Fields inherited from class xal.tools.correlator.SourceAgent
binUpdateProxy, name -
Constructor Summary
ConstructorsConstructorDescriptionChannelAgent(MessageCenter localCenter, Channel newChannel, String newName, RecordFilter<ChannelTimeRecord> recordFilter, CorrelationTester<ChannelTimeRecord> tester) Creates new ChannelAgent -
Method Summary
Modifier and TypeMethodDescriptionbooleanisActive()Determine if the channel is actively being monitored.booleanDetermine if the channel is enabled for correlations.protected voidCreate a monitor to listen for new channel records.protected voidsetupEventHandler(RecordFilter<ChannelTimeRecord> recordFilter) Setup the event handler to use the specified record filter to filter monitor events for this channel.booleanStart monitoring the channel.voidStop monitoring the channelMethods inherited from class xal.tools.correlator.SourceAgent
binTimespanChanged, correlationFilterChanged, name, postEvent, reset, setBinTimespan, shutdown, sourceAdded, sourceRemoved, willStartMonitoring, willStopMonitoring
-
Constructor Details
-
ChannelAgent
public ChannelAgent(MessageCenter localCenter, Channel newChannel, String newName, RecordFilter<ChannelTimeRecord> recordFilter, CorrelationTester<ChannelTimeRecord> tester) Creates new ChannelAgent- Parameters:
localCenter- local shared message centernewChannel- channel to monitornewName- namerecordFilter- filter for recordstester- correlation tester
-
-
Method Details
-
setupEventHandler
Setup the event handler to use the specified record filter to filter monitor events for this channel.- Specified by:
setupEventHandlerin classSourceAgent<ChannelTimeRecord>- Parameters:
recordFilter- The filter to use for this channel.- See Also:
-
isEnabled
public boolean isEnabled()Determine if the channel is enabled for correlations.- Returns:
- true if the channel is enabled for correlations.
-
isActive
public boolean isActive()Determine if the channel is actively being monitored.- Returns:
- true if the channel is being monitored and false otherwise.
-
startMonitor
public boolean startMonitor()Start monitoring the channel.- Specified by:
startMonitorin classSourceAgent<ChannelTimeRecord>- Returns:
- true if the channel is successfully being monitored and false otherwise.
-
stopMonitor
public void stopMonitor()Stop monitoring the channel- Specified by:
stopMonitorin classSourceAgent<ChannelTimeRecord>
-
makeMonitor
protected void makeMonitor()Create a monitor to listen for new channel records.
-