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 class
Handle the monitor eventsprotected class
Handle 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 TypeMethodDescriptionboolean
isActive()
Determine if the channel is actively being monitored.boolean
Determine if the channel is enabled for correlations.protected void
Create a monitor to listen for new channel records.protected void
setupEventHandler
(RecordFilter<ChannelTimeRecord> recordFilter) Setup the event handler to use the specified record filter to filter monitor events for this channel.boolean
Start monitoring the channel.void
Stop 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:
setupEventHandler
in 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:
startMonitor
in classSourceAgent<ChannelTimeRecord>
- Returns:
- true if the channel is successfully being monitored and false otherwise.
-
stopMonitor
public void stopMonitor()Stop monitoring the channel- Specified by:
stopMonitor
in classSourceAgent<ChannelTimeRecord>
-
makeMonitor
protected void makeMonitor()Create a monitor to listen for new channel records.
-