Class EpicsChannelMonitorSubscriber

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

@Immutable @Component class EpicsChannelMonitorSubscriber extends Object
Provides the functionality to monitor the specified EPICS channel and to publish updating channel value information to listening consumers.
  • Constructor Details

    • EpicsChannelMonitorSubscriber

      public EpicsChannelMonitorSubscriber(@Autowired WicaChannelValueCreator wicaChannelValueCreator)
      Returns a new instance that will work with the specified value builder object.
      Parameters:
      wicaChannelValueCreator - the builder.
  • Method Details

    • subscribe

      void subscribe(org.epics.ca.Channel<Object> channel, Consumer<WicaChannelValue> valueChangeHandler)
      Establishes a monitor on the supplied EPICS channel and registers a handler which should subsequently be informed when the channel value changes.

      This method operates synchronously and incurs the cost of a network round trip to establish the monitor on the remote data source.

      Precondition: the channel should have been connected at least once. Postcondition: the state of the channel will remain unaffected.

      Parameters:
      channel - the EPICS channel.
      valueChangeHandler - the event consumer.
      Throws:
      NullPointerException - if the channel argument was null.
      IllegalStateException - if the channel state was not as expected.