Package xal.ca
Class MonitorCache
java.lang.Object
xal.ca.MonitorCache
Connect to, monitor and cache a channel's monitor events.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected class
Handle connection eventsprotected class
Handle monitor events -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Channel
the channel to wrapprotected final ConnectionListener
listener to handle connection eventsprotected final IEventSinkValTime
Proxy which forwards monitor events to registered listeners.protected ChannelTimeRecord
latest monitor eventprotected final MessageCenter
Message center for dispatching monitor events to registered listeners.protected Monitor
a channel monitorprotected final IEventSinkValTime
listener to handle monitor events -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addMonitorListener
(IEventSinkValTime listener) Register the listener to receive IEventSinkValTime events from the monitorvoid
dispose()
Dispose of this wrapper's resources.Get the channel.Get the latest record.boolean
Determine if the channel is connected.void
removeMonitorListener
(IEventSinkValTime listener) Remove the listener from receiving IEventSinkValTime events from this monitorvoid
Request a connection and start the monitor upon connection.
-
Field Details
-
messageCenter
Message center for dispatching monitor events to registered listeners. -
eventProxy
Proxy which forwards monitor events to registered listeners. -
channel
the channel to wrap -
connectionHandler
listener to handle connection events -
monitorEventHandler
listener to handle monitor events -
monitor
a channel monitor -
latestRecord
latest monitor event
-
-
Constructor Details
-
MonitorCache
Constructor- Parameters:
channel
- to monitor
-
-
Method Details
-
dispose
public void dispose()Dispose of this wrapper's resources. -
addMonitorListener
Register the listener to receive IEventSinkValTime events from the monitor- Parameters:
listener
- to receive events
-
removeMonitorListener
Remove the listener from receiving IEventSinkValTime events from this monitor- Parameters:
listener
- to remove from receiving events
-
requestMonitor
public void requestMonitor()Request a connection and start the monitor upon connection. -
getChannel
Get the channel.- Returns:
- wrapped channel
-
isConnected
public boolean isConnected()Determine if the channel is connected.- Returns:
- true if the channel is connected and false if not
-
getLatestRecord
Get the latest record.- Returns:
- latest record
-