Class EpicsChannelMonitorPublisher

java.lang.Object
ch.psi.wica.controlsystem.epics.monitor.EpicsChannelMonitorPublisher

@Component @ThreadSafe public class EpicsChannelMonitorPublisher extends Object
Monitors an EPICS channel of interest and publishes value changes as they are notified.
  • Constructor Details

    • EpicsChannelMonitorPublisher

      EpicsChannelMonitorPublisher(@Autowired EpicsChannelMonitorSubscriber epicsChannelMonitorSubscriber, @Autowired WicaChannelEventPublisher wicaChannelEventPublisher, @Autowired StatisticsCollectionService statisticsCollectionService)
      Creates a new instance.
      Parameters:
      epicsChannelMonitorSubscriber - class which will inform of monitor changes.
      wicaChannelEventPublisher - class which will publish monitor changes.
      statisticsCollectionService - class which will collect statistics.
  • Method Details

    • getStatistics

      public EpicsChannelMonitorStatistics getStatistics()
      Returns the statistics for this publisher.
      Returns:
      the statistics.
    • isRequestObjectRecognised

      public boolean isRequestObjectRecognised(EpicsChannelMonitorRequest requestObject)
      Returns a boolean indicating whether the supplied request object has already been added to the internal list of channels being monitored.
      Parameters:
      requestObject - object providing the request details.
      Returns:
      the result.
    • addChannel

      public void addChannel(EpicsChannelMonitorRequest requestObject)
      Adds a new channel to be monitored.
      Parameters:
      requestObject - object providing the request details.
    • removeChannel

      public void removeChannel(EpicsChannelMonitorRequest requestObject)
      Removes a channel from monitoring.
      Parameters:
      requestObject - object providing the request details.
    • removeAllChannels

      public void removeAllChannels()
      Removes all channel monitors.
    • handleChannelConnectedEvent

      @EventListener(condition="#event.scope == \'monitored\'") public void handleChannelConnectedEvent(EpicsChannelConnectedEvent event)
      Handles the response to an EPICS channel monitor becoming connected.
      Parameters:
      event - the event.
    • handleChannelDisconnectedEvent

      @EventListener(condition="#event.scope == \'monitored\'") public void handleChannelDisconnectedEvent(EpicsChannelDisconnectedEvent event)
      Handles the response to an EPICS channel monitor becoming disconnected.
      Parameters:
      event - the event.