Package org.eso.ias.converter
Class ConverterStream
java.lang.Object
org.eso.ias.converter.ConverterStream
- Direct Known Subclasses:
ConverterKafkaStream
The interface to stream the strings received
from the plugin (i.e. the stringified version of a
monitor point value or alarm) to strings to send
to the core of the IAS (i.e. a stringified representation
of a IAS value)
Classes extending ConverterStream
could need to
instantiate a thread (in start()
to receive data
from the input stream depending on the underlying transport system.
- Author:
- acaproni
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract void
init()
User defined initializationvoid
initialize
(Function<String, String> mapper) Initialize the streamvoid
start()
Start streaming data from the input to the output stream in a dedicated thread.protected abstract void
Start streaming data from the input to the output stream in a dedicated thread.void
stop()
Stops getting data from the input streamprotected abstract void
Stops getting data from the input stream
-
Field Details
-
mapper
The function to map a input string to output string -
converterID
The ID of the converter.The ID of the converter uniquely identify each running converter
-
-
Constructor Details
-
ConverterStream
Constructor- Parameters:
converterID
- The ID of the converter.
-
-
Method Details
-
initialize
Initialize the streamAfter some initialization, it delegates to
init()
- Parameters:
mapper
- the function to map inputs to outputs- Throws:
ConverterStreamException
- in case of error initializing
-
init
User defined initialization- Throws:
ConverterStreamException
- in case of error initializing
-
start
Start streaming data from the input to the output stream in a dedicated thread.it delegates to the user implemented
startStreaming()
- Throws:
ConverterStreamException
- in case of error starting
-
stop
Stops getting data from the input streamit delegates to the user implemented
stopStreaming()
- Throws:
ConverterStreamException
- in case of error stopping
-
startStreaming
Start streaming data from the input to the output stream in a dedicated thread.- Throws:
ConverterStreamException
- in case of error starting
-
stopStreaming
Stops getting data from the input stream- Throws:
ConverterStreamException
- in case of error stopping
-