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 classPolls an EPICS channel. -
Constructor Summary
ConstructorsConstructorDescriptionEpicsChannelPollerPublisher(EpicsChannelValueGetter epicsChannelValueGetter, WicaChannelEventPublisher wicaChannelEventPublisher, StatisticsCollectionService statisticsCollectionService) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddChannel(EpicsChannelPollerRequest requestObject) Adds a new channel to be polled.voidclose()Closes the service.Returns the statistics for this publisher.voidHandles the response to an EPICS channel poller becoming connected.voidHandles the response to an EPICS channel poller becoming disconnected.booleanisRequestObjectRecognised(EpicsChannelPollerRequest requestObject) Returns a boolean indicating whether the supplied request object has already been added to the internal list of channels being monitored.voidRemoves all channel pollers.voidremoveChannel(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.
-