Class EpicsChannelMonitorPublisher
java.lang.Object
ch.psi.wica.controlsystem.epics.monitor.EpicsChannelMonitorPublisher
Monitors an EPICS channel of interest and publishes value changes as they are notified.
-
Constructor Summary
ConstructorsConstructorDescriptionEpicsChannelMonitorPublisher(EpicsChannelMonitorSubscriber epicsChannelMonitorSubscriber, WicaChannelEventPublisher wicaChannelEventPublisher, StatisticsCollectionService statisticsCollectionService) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddChannel(EpicsChannelMonitorRequest requestObject) Adds a new channel to be monitored.Returns the statistics for this publisher.voidHandles the response to an EPICS channel monitor becoming connected.voidHandles the response to an EPICS channel monitor becoming disconnected.booleanisRequestObjectRecognised(EpicsChannelMonitorRequest 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 monitors.voidremoveChannel(EpicsChannelMonitorRequest requestObject) Removes a channel from monitoring.
-
Constructor Details
-
EpicsChannelMonitorPublisher
EpicsChannelMonitorPublisher(@Autowired EpicsChannelMonitorSubscriber epicsChannelMonitorSubscriber, @Autowired WicaChannelEventPublisher wicaChannelEventPublisher, @Autowired StatisticsCollectionService statisticsCollectionService) Creates a new instance.- Parameters:
epicsChannelMonitorSubscriber- class which will inform of monitor 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 monitored.- Parameters:
requestObject- object providing the request details.
-
removeChannel
Removes a channel from monitoring.- Parameters:
requestObject- object providing the request details.
-
removeAllChannels
public void removeAllChannels()Removes all channel monitors. -
handleChannelConnectedEvent
@EventListener(condition="#event.scope == \'monitored\'") public void handleChannelConnectedEvent(EpicsChannelConnectedEvent event) Handles the response to an EPICS channel monitor becoming connected.- Parameters:
event- the event.
-
handleChannelDisconnectedEvent
@EventListener(condition="#event.scope == \'monitored\'") public void handleChannelDisconnectedEvent(EpicsChannelDisconnectedEvent event) Handles the response to an EPICS channel monitor becoming disconnected.- Parameters:
event- the event.
-