Class Hl7v2Dispatcher
ORU^R01 messages and sends them over MLLP
to a remote endpoint, retrying on transient failures via the Dispatcher base.
Only channels present in the mapping are emitted (so high-rate waveforms are naturally skipped),
and emission is further throttled by the EmissionGate, keyed per device and channel.
Deployment caution: never point host/port at FRAMED's own
Hl7v2Protocol MLLP server. The inbound side republishes received observations under the
mapped device groups — the very groups this dispatcher subscribes to — so a self-referential
endpoint creates a feedback loop that re-emits every observation indefinitely.
-
Field Summary
Fields inherited from class com.framed.core.Service
ADDRESS_REGISTRY_SUFFIX, eventBus, formatter, logger -
Constructor Summary
ConstructorsConstructorDescriptionHl7v2Dispatcher(EventBus eventBus, org.json.JSONArray devices, String host, int port, String mappingPath, org.json.JSONObject patient, org.json.JSONObject sendingIds, org.json.JSONObject gate) -
Method Summary
Methods inherited from class com.framed.io.dispatch.Dispatcher
onDrop, onHandlerError, shutdownMethods inherited from class com.framed.core.Service
addressRegistry, announceAddress, subscribeToAnnouncements
-
Constructor Details
-
Hl7v2Dispatcher
public Hl7v2Dispatcher(EventBus eventBus, org.json.JSONArray devices, String host, int port, String mappingPath, org.json.JSONObject patient, org.json.JSONObject sendingIds, org.json.JSONObject gate) - Parameters:
eventBus- the event busdevices- device groups whose announced channels are forwardedhost- MLLP server host to send toport- MLLP server portmappingPath- path to the interop mapping JSONpatient- PID/PV1 context (config JSON)sendingIds- MSH-3..6 identifiers (config JSON)gate- emission gate config (minIntervalMs,onChange)
-
-
Method Details
-
push
Description copied from class:DispatcherPushes a single datapoint to the underlying sink.Invoked on the dispatcher's worker thread. Implementations may throw
IOExceptionto signal a transient failure, which triggers retry with exponential backoff.- Specified by:
pushin classDispatcher- Parameters:
dataPoint- the datapoint to push- Throws:
IOException- if the push fails due to a transient IO error and should be retried
-
pushBatch
Description copied from class:DispatcherPushes a batch of datapoints to the underlying sink.- Specified by:
pushBatchin classDispatcher- Parameters:
batch- the datapoints to push
-
stop
public void stop()Description copied from class:ServiceStops the service.By default, this method logs a message indicating that no stop logic is implemented. Subclasses should override this method to provide custom shutdown behavior when necessary.
- Overrides:
stopin classDispatcher
-
