tethys.core.streams.stream_base
¶
Module Contents¶
-
class
tethys.core.streams.stream_base.
StreamBase
[source]¶ Bases:
tethys.core.regobjs.regobj_base.RegistrableObjectBase
Base abstract class for the Streams
-
abstract
open
(self, **kwargs) → 'StreamBase'[source]¶ Open the stream
- Returns
self instance
- Return type
-
abstract
close
(self, **kwargs) → 'StreamBase'[source]¶ Close the stream
- Returns
self instance
- Return type
-
abstract
write
(self, data_packet: Any, **kwargs)[source]¶ Write the data_packet to the stream
- Parameters
data_packet – any data object
-
abstract
read
(self, count: int = None, wait_timeout: float = None, **kwargs) → Generator[source]¶ Read the data_packets from the stream. Return Generator.
-
abstract
ack
(self, message_key: str, **kwargs)[source]¶ Acknowledge message
- Parameters
message_key (str) – message key for the acknowledgement
-
abstract
redirect_to
(self, station: StationBase, **kwargs)[source]¶ Redirect stream processing to the station
- Parameters
station (StationBase) – Station where the stream can be processed in the near time
-
abstract