public class TripMonitor extends java.lang.Object implements NodeMonitorListener
Modifier and Type | Field and Description |
---|---|
protected boolean |
_isEnabled
indicates whether this monitor is enabled
|
protected TripMonitorFilter |
MONITOR_FILTER
trip monitor filter
|
protected java.util.List<NodeMonitor> |
NODE_MONITORS
list of node monitors
|
protected java.util.List<TripRecord> |
TRIP_HISTORY
trip records
|
Constructor and Description |
---|
TripMonitor(TripMonitorFilter monitorFilter)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
clearTripRecords(java.util.List<TripRecord> records)
remove the specified records from history
|
void |
connectionChanged(NodeMonitor nodeMonitor,
ChannelMonitor monitor,
boolean connected)
The channel's connection has changed.
|
protected java.util.List<NodeMonitor> |
generateNodeMonitors()
generate the list of node monitors
|
java.util.List<ChannelMonitor> |
getChannelMonitors()
get the channel monitors
|
java.lang.String |
getName()
get the name of the trip monitor
|
PersistentStore |
getPersistentStore()
get the persistent store
|
java.util.List<TripRecord> |
getTripHistory()
get the trip records
|
int |
getTripHistoryCount()
get the number of trip records in the history buffer
|
void |
handleTrip(NodeMonitor nodeMonitor,
TripRecord tripRecord)
The PV's monitored trip count has been incremented.
|
boolean |
isEnabled()
determine if this monitor is enabled
|
void |
setEnabled(boolean shouldEnable)
set whether this monitor is enabled
|
java.lang.String |
toString()
description of this instance
|
protected final TripMonitorFilter MONITOR_FILTER
protected final java.util.List<NodeMonitor> NODE_MONITORS
protected final java.util.List<TripRecord> TRIP_HISTORY
protected volatile boolean _isEnabled
public TripMonitor(TripMonitorFilter monitorFilter)
protected java.util.List<NodeMonitor> generateNodeMonitors()
public java.lang.String getName()
public PersistentStore getPersistentStore()
public java.util.List<ChannelMonitor> getChannelMonitors()
public int getTripHistoryCount()
public java.util.List<TripRecord> getTripHistory()
public void clearTripRecords(java.util.List<TripRecord> records)
public boolean isEnabled()
public void setEnabled(boolean shouldEnable)
public java.lang.String toString()
toString
in class java.lang.Object
public void handleTrip(NodeMonitor nodeMonitor, TripRecord tripRecord)
handleTrip
in interface NodeMonitorListener
nodeMonitor
- the node monitor whose channel has trippedtripRecord
- record of the trippublic void connectionChanged(NodeMonitor nodeMonitor, ChannelMonitor monitor, boolean connected)
connectionChanged
in interface NodeMonitorListener
nodeMonitor
- the node monitor whose channel has changed connection statemonitor
- The channel monitor whose connection status has changed.connected
- The channel's new connection state