public class ChannelWrapper
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
protected class |
ChannelWrapper.ConnectionHandler
Connection handler is a class whose instance listens for connection
events of the wrapped channel.
|
Modifier and Type | Field and Description |
---|---|
protected Channel |
_channel
The channel to wrap
|
protected ChannelWrapper.ConnectionHandler |
_connectionHandler
The handler handles channel connection events
|
protected Monitor |
_monitor
The monitor for the channel
|
protected ChannelTimeRecord |
_record
The latest channel record found by the monitor
|
Constructor and Description |
---|
ChannelWrapper(java.lang.String pv)
ChannelWrapper constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addConnectionListener(ConnectionListener listener)
Add the specified object as a listener of channel connection events of the
channel that is wrapped.
|
void |
dispose()
Dispose of the channel resources: Shutdown the monitor if a monitor is active.
|
Channel |
getChannel()
Get the wrapped channel.
|
java.lang.String |
getPV()
Get the PV for the channel being wrapped.
|
ChannelTimeRecord |
getRecord()
Get the latest channel record cached.
|
protected void |
makeMonitor()
Create a monitor to listen for new channel records.
|
void |
removeConnectionListener(ConnectionListener listener)
Remove the specified object from being a listener of channel connection events
of the channel that is wrapped.
|
protected void |
requestConnection()
Request that the channel be connected.
|
protected Channel _channel
protected Monitor _monitor
protected volatile ChannelTimeRecord _record
protected ChannelWrapper.ConnectionHandler _connectionHandler
public ChannelWrapper(java.lang.String pv)
pv
- The PV for which to create a channel.public void dispose()
public void addConnectionListener(ConnectionListener listener)
listener
- the object to add as a connection listener.public void removeConnectionListener(ConnectionListener listener)
listener
- the object to remove from being a connection listenerprotected void requestConnection()
protected void makeMonitor()
public java.lang.String getPV()
public Channel getChannel()
public ChannelTimeRecord getRecord()