|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--gov.sns.tools.pvlogger.ChannelWrapper
ChannelWrapper is a wrapper for a Channel that handles connecting to the channel and setting up a monitor when its channel is connected. Cache the latest channel record that has been found by the monitor.
| Nested Class Summary | |
protected class |
ChannelWrapper.ConnectionHandler
Connection handler is a class whose instance listens for connection events of the wrapped channel. |
| Field Summary | |
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 Summary | |
ChannelWrapper(java.lang.String pv)
ChannelWrapper constructor |
|
| Method Summary | |
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. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected Channel _channel
protected Monitor _monitor
protected ChannelTimeRecord _record
protected ChannelWrapper.ConnectionHandler _connectionHandler
| Constructor Detail |
public ChannelWrapper(java.lang.String pv)
pv - The PV for which to create a channel.| Method Detail |
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()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||