Interface MonitorPointSender
- All Known Implementing Classes:
- BufferedFilePublisherBase,- BufferedListenerPublisher,- BufferedPublisherBase,- FilePublisher,- JsonFilePublisher,- KafkaPublisher,- ListenerPublisher,- PublisherBase
MonitorPointSender defines the interface
 to send monitor point values and alarms to the IAS core.
 
 When a value is received from the monitored system and,
 if it is the case, filtered for noise, it is finally ready to be
 sent to the IAS core by invoking offer(ValueToSend)
 
 
 Implementers of this class, provides statistics collected during
 the last observation period, getStats().
 
 Life cycle:
 
- setUp()must be called to allocate the resources needed for sending massages to the core of the IAS
- tearDown()must be called to release the resources: no more messages can be sent after calling this method
 Offering an item to a MonitorPointSender does not ensure
 that it is really sent to the final destination but the producer of
 monitor pont values is supposed to continue providing monitor point
 values at the proper time intervals.
 
 The sender is, in fact, totally decoupled from the core of the IAS
 and its functioning is not affected by the availability of the core
 or the transport mechanism.
 This allows to shutdown the transport framework or the core of
 the IAS without affecting the functioning of the plugin that results,
 de facto, totally decoupled from the IAS.
- Author:
- acaproni
- 
Nested Class SummaryNested ClassesModifier and TypeInterfaceDescriptionstatic classThe statistics provided by the sender in the last time interval.
- 
Method SummaryModifier and TypeMethodDescriptiongetStats()The statistics collected by the publisher after the previous invocation of this method.booleanisClosed()booleanvoidoffer(ValueToSend monitorPoint) Offer a monitor point to the publisher for sending to the corevoidsetUp()Initialization method to allocate the resources needed to send messages to the core of the IAS.voidPublishing of messages begins after calling this method.voidStop sending messages to the core of the IAS.voidtearDown()Free all the resources when sending messages to the core of the IAS is not required anymore.
- 
Method Details- 
offerOffer a monitor point to the publisher for sending to the core- Parameters:
- monitorPoint- The not- nullmonitor point to be sent to the IAS
 
- 
getStatsMonitorPointSender.SenderStats getStats()The statistics collected by the publisher after the previous invocation of this method.Calling this method resets all the counters. - Returns:
- The statistics collected by the publisher
 
- 
setUpInitialization method to allocate the resources needed to send messages to the core of the IAS.Even if the publisher is ready to send messages, no message will be published before calling startSending().- Throws:
- PublisherException- In case of error acquiring the resources
 
- 
tearDownFree all the resources when sending messages to the core of the IAS is not required anymore.- Throws:
- PublisherException- In case of error releasing the resources
 
- 
startSendingvoid startSending()Publishing of messages begins after calling this method.- See Also:
 
- 
stopSendingvoid stopSending()Stop sending messages to the core of the IAS.Updates to be published when the sender is stopped are lost forever. - See Also:
 
- 
isStoppedboolean isStopped()- Returns:
- trueif sending values to the core of the IAS has been stopped
 
- 
isClosedboolean isClosed()- Returns:
- trueif the sender has been closed
 
 
-