Class EpicsChannelConnectionChangeSubscriber
java.lang.Object
ch.psi.wica.controlsystem.epics.channel.EpicsChannelConnectionChangeSubscriber
Provides the functionality to monitor the specified EPICS channel and
to publish updating channel value information to listening consumers.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classHandles notification of EPICS channel connection state changes.(package private) static classProvides a dedicated task executor for the EPICS channel connection change notifier. -
Constructor Summary
ConstructorsConstructorDescriptionEpicsChannelConnectionChangeSubscriber(EpicsChannelConnectionChangeSubscriber.EpicsChannelConnectionStateChangeNotifier myExecutor) Constructs a new instance. -
Method Summary
-
Constructor Details
-
EpicsChannelConnectionChangeSubscriber
public EpicsChannelConnectionChangeSubscriber(@Autowired EpicsChannelConnectionChangeSubscriber.EpicsChannelConnectionStateChangeNotifier myExecutor) Constructs a new instance.- Parameters:
myExecutor- the executor.
-
-
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.
-