Class EpicsChannelPollerPublisher

java.lang.Object
ch.psi.wica.controlsystem.epics.poller.EpicsChannelPollerPublisher

@Component @ThreadSafe public class EpicsChannelPollerPublisher extends Object
Polls an EPICS channel of interest and publishes the result.
  • Constructor Details

    • EpicsChannelPollerPublisher

      public EpicsChannelPollerPublisher(@Autowired EpicsChannelValueGetter epicsChannelValueGetter, @Autowired WicaChannelEventPublisher wicaChannelEventPublisher, @Autowired StatisticsCollectionService statisticsCollectionService)
      Creates a new instance.
      Parameters:
      epicsChannelValueGetter - class which will get channel value changes.
      wicaChannelEventPublisher - class which will publish monitor changes.
      statisticsCollectionService - class which will collect statistics.
  • Method Details

    • getStatistics

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

      public boolean isRequestObjectRecognised(EpicsChannelPollerRequest 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(EpicsChannelPollerRequest requestObject)
      Adds a new channel to be polled.
      Parameters:
      requestObject - object providing the request details.
    • removeChannel

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

      public void removeAllChannels()
      Removes all channel pollers.
    • close

      public void close()
      Closes the service.
    • handleChannelConnectedEvent

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

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