Class EpicsChannelPollerPublisher
java.lang.Object
ch.psi.wica.controlsystem.epics.poller.EpicsChannelPollerPublisher
Polls an EPICS channel of interest and publishes the result.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Polls an EPICS channel. -
Constructor Summary
ConstructorsConstructorDescriptionEpicsChannelPollerPublisher
(EpicsChannelValueGetter epicsChannelValueGetter, WicaChannelEventPublisher wicaChannelEventPublisher, StatisticsCollectionService statisticsCollectionService) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addChannel
(EpicsChannelPollerRequest requestObject) Adds a new channel to be polled.void
close()
Closes the service.Returns the statistics for this publisher.void
Handles the response to an EPICS channel poller becoming connected.void
Handles the response to an EPICS channel poller becoming disconnected.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.void
Removes all channel pollers.void
removeChannel
(EpicsChannelPollerRequest requestObject) Removes a channel from polling.
-
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
Returns the statistics for this publisher.- Returns:
- the statistics.
-
isRequestObjectRecognised
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
Adds a new channel to be polled.- Parameters:
requestObject
- object providing the request details.
-
removeChannel
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.
-