Class EpicsChannelConnectionChangeSubscriber

java.lang.Object
ch.psi.wica.controlsystem.epics.channel.EpicsChannelConnectionChangeSubscriber

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

  • Method Details

    • subscribe

      public void subscribe(org.epics.ca.Channel<Object> channel, Consumer<Boolean> connectionChangeHandler)
      Registers a handler which will publish connection changed events.

      This method operates synchronously but does NOT involve a network round trip.

      The supplied will be called back from MULTIPLE threads derived from an internal thread pool.

      Precondition: the supplied channel should never previously have been connected. Postcondition: the state of the channel will remain unaffected.

      Parameters:
      channel - the EPICS channel.
      connectionChangeHandler - the event consumer.
      Throws:
      NullPointerException - if the channel argument was null.
      NullPointerException - if the connectionChangeHandler argument was null.
      IllegalStateException - if the channel was in an unexpected state on entry or exit.