public class MonitorController
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected Channel |
_channel
The channel to wrap
|
protected ConnectionListener |
_connectionListener
connection listener
|
protected java.lang.Object |
_eventLock
synchronization lock
|
protected MonitorEventListener |
_eventProxy
proxy for posting channel events
|
protected ChannelTimeRecord |
_lastRecord
last record captured
|
protected MessageCenter |
_messageCenter
event message center
|
protected Monitor |
_monitor
The monitor for the channel
|
protected int |
MONITOR_MASK
the monitor mask to use when initializing the monitor (Monitor.VALUE, Monitor.LOG, Monitor.ALARM)
|
Constructor and Description |
---|
MonitorController(Channel channel)
Constructor using the default monitor mask (Monitor.VALUE).
|
MonitorController(Channel channel,
int monitorMask)
Primary constructor.
|
MonitorController(java.lang.String pv)
Constructor creating a channel from the specified PV and using the default monitor mask (Monitor.VALUE).
|
MonitorController(java.lang.String pv,
int monitorMask)
Constructor creating a channel from the specified PV and applying the specified monitor mask.
|
Modifier and Type | Method and Description |
---|---|
void |
addMonitorEventListener(MonitorEventListener listener)
Register the listener as a receiver of channel events from this controller.
|
void |
dispose()
Dispose of the channel wrapper resources by clearing the monitor (if any) and disposing of
of the messaging resources.
|
Channel |
getChannel()
Get this instance's controlled channel.
|
ChannelTimeRecord |
getLatestRecord()
Get the latest channel record.
|
java.lang.String |
getPV()
Get the PV for the controlled channel.
|
boolean |
isConnected()
Determine if the channel is connected.
|
protected void |
makeMonitor()
Create a monitor to listen for new channel records.
|
void |
removeMonitorEventListener(MonitorEventListener listener)
Remove the listener as a receiver of channel events from this controller.
|
void |
requestMonitor()
Request that the channel be connected.
|
protected final int MONITOR_MASK
protected final java.lang.Object _eventLock
protected MessageCenter _messageCenter
protected MonitorEventListener _eventProxy
protected Channel _channel
protected Monitor _monitor
protected ChannelTimeRecord _lastRecord
protected ConnectionListener _connectionListener
public MonitorController(Channel channel, int monitorMask)
channel
- The channel to wrap.monitorMask
- The monitor mask to apply when instantiating the monitor.public MonitorController(Channel channel)
channel
- The channel to wrap.public MonitorController(java.lang.String pv, int monitorMask)
pv
- The PV for which to create a channel.monitorMask
- The monitor mask to apply when instantiating the monitor.public MonitorController(java.lang.String pv)
pv
- The PV for which to create a channel.public void addMonitorEventListener(MonitorEventListener listener)
listener
- The listener to receive channel eventspublic void removeMonitorEventListener(MonitorEventListener listener)
listener
- The listener to remove from receiving channel eventspublic java.lang.String getPV()
public Channel getChannel()
public boolean isConnected()
public ChannelTimeRecord getLatestRecord()
public void requestMonitor()
protected void makeMonitor()
public void dispose()