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 TypeMethodDescriptionvoid
addChannel
(EpicsChannelMonitorRequest requestObject) Adds a new channel to be monitored.Returns the statistics for this publisher.void
Handles the response to an EPICS channel monitor becoming connected.void
Handles the response to an EPICS channel monitor becoming disconnected.boolean
isRequestObjectRecognised
(EpicsChannelMonitorRequest 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 monitors.void
removeChannel
(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.
-