Package xal.ca

Class MonitorCache

java.lang.Object
xal.ca.MonitorCache

public class MonitorCache extends Object
Connect to, monitor and cache a channel's monitor events.
  • Field Details

    • messageCenter

      protected final MessageCenter messageCenter
      Message center for dispatching monitor events to registered listeners.
    • eventProxy

      protected final IEventSinkValTime eventProxy
      Proxy which forwards monitor events to registered listeners.
    • channel

      protected final Channel channel
      the channel to wrap
    • connectionHandler

      protected final ConnectionListener connectionHandler
      listener to handle connection events
    • monitorEventHandler

      protected final IEventSinkValTime monitorEventHandler
      listener to handle monitor events
    • monitor

      protected Monitor monitor
      a channel monitor
    • latestRecord

      protected ChannelTimeRecord latestRecord
      latest monitor event
  • Constructor Details

    • MonitorCache

      public MonitorCache(Channel channel)
      Constructor
      Parameters:
      channel - to monitor
  • Method Details

    • dispose

      public void dispose()
      Dispose of this wrapper's resources.
    • addMonitorListener

      public void addMonitorListener(IEventSinkValTime listener)
      Register the listener to receive IEventSinkValTime events from the monitor
      Parameters:
      listener - to receive events
    • removeMonitorListener

      public void removeMonitorListener(IEventSinkValTime listener)
      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

      public Channel 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

      public ChannelTimeRecord getLatestRecord()
      Get the latest record.
      Returns:
      latest record