Package com.framed.io.parser
Class Parser<T>
java.lang.Object
com.framed.core.Service
com.framed.io.parser.Parser<T>
- Type Parameters:
T- the type of raw input this parser decodes
- Direct Known Subclasses:
MedibusRealTimeParser,MedibusSlowParser,PythonParser
Abstract base for services that turn raw input into events published on the event bus.
A parser consumes raw messages of type T (for example a line of text or a binary
frame received from a device) and publishes the decoded values as events for downstream
services to consume.
-
Field Summary
Fields inherited from class com.framed.core.Service
ADDRESS_REGISTRY_SUFFIX, eventBus, formatter, logger -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.framed.core.Service
addressRegistry, announceAddress, stop
-
Constructor Details
-
Parser
Creates a new parser bound to the given event bus.- Parameters:
eventBus- the event bus used to publish parsed events
-
-
Method Details
-
parse
Parses a raw input message and publishes the resulting events on the event bus.- Parameters:
message- the raw input to parsedeviceName- the identifier of the device the message originated from
-
