public interface ApplicationRouter
Modifier and Type | Interface and Description |
---|---|
static interface |
ApplicationRouter.AppRoutingData
Encapsulates the message fields used for routing of messages from the
HL7 protocol to the appropriate
Application . |
Modifier and Type | Field and Description |
---|---|
static String |
METADATA_KEY_MESSAGE_CHARSET
Metadata key:
Charset (MSH-18) |
static String |
METADATA_KEY_MESSAGE_CONTROL_ID
Metadata key:
Message control ID (MSH-10) |
static String |
METADATA_KEY_SENDING_IP
Metadata key:
Provides the IP of the sending system for a given message |
static String |
METADATA_KEY_SENDING_PORT
Metadata key:
Provides the port of the sending system for a given message |
Modifier and Type | Method and Description |
---|---|
void |
bindApplication(ApplicationRouter.AppRoutingData theRoutingData,
ReceivingApplication<? extends Message> theApplication)
Associates the given application with the given message parameters, so that messages
with matching parameters will be sent there.
|
void |
disableBinding(ApplicationRouter.AppRoutingData theRoutingData)
Temporarily deactivates the binding on the given field data, if present.
|
void |
enableBinding(ApplicationRouter.AppRoutingData theRoutingData)
Undoes
disableBinding(AppRoutingData theRoutingData) . |
Parser |
getParser() |
boolean |
hasActiveBinding(ApplicationRouter.AppRoutingData theRoutingData) |
Transportable |
processMessage(Transportable theMessage)
Attempts to route the given message to the associated
Application
and obtain a response. |
void |
setExceptionHandler(ReceivingApplicationExceptionHandler exceptionHandler)
Sets an exception handler which will be invoked in the event of a
failure during parsing, processing, or encoding of an
incoming message or its response.
|
boolean |
unbindApplication(ApplicationRouter.AppRoutingData theRoutingData)
Removes the binding for the given message parameters
|
boolean |
unbindApplication(ReceivingApplication<? extends Message> theApplication)
Removes the binding for the given message parameters
|
static final String METADATA_KEY_MESSAGE_CHARSET
Metadata
key:
Charset (MSH-18)static final String METADATA_KEY_MESSAGE_CONTROL_ID
Metadata
key:
Message control ID (MSH-10)static final String METADATA_KEY_SENDING_IP
Metadata
key:
Provides the IP of the sending system for a given messagestatic final String METADATA_KEY_SENDING_PORT
Metadata
key:
Provides the port of the sending system for a given messageTransportable processMessage(Transportable theMessage) throws HL7Exception
Application
and obtain a response.theMessage
- the message to routeHL7Exception
boolean hasActiveBinding(ApplicationRouter.AppRoutingData theRoutingData)
theRoutingData
- message fields used in determining the appropriate destinationvoid bindApplication(ApplicationRouter.AppRoutingData theRoutingData, ReceivingApplication<? extends Message> theApplication)
Associates the given application with the given message parameters, so that messages with matching parameters will be sent there. Only one application can be registered for a given set of parameters: repeated registration for a particular combination over-writes the previous one.
Because of wildcards, there may be multiple registrations that match a given message. In this case, the first registered wins.
theRoutingData
- message fields used in determining the appropriate destinationtheApplication
- the application to which messages with these parameters should be
sentboolean unbindApplication(ApplicationRouter.AppRoutingData theRoutingData)
theRoutingData
- boolean unbindApplication(ReceivingApplication<? extends Message> theApplication)
theRoutingData
- void disableBinding(ApplicationRouter.AppRoutingData theRoutingData)
theRoutingData
- the fields that define a set of messages that are bound to
some Application
void enableBinding(ApplicationRouter.AppRoutingData theRoutingData)
disableBinding(AppRoutingData theRoutingData)
.theRoutingData
- the fields that define a set of messages that are bound to
some Application
Parser getParser()
Parser
that is used to parse inbound messages
and encode outbound ones. It may be of interest to set certain parameters
of this parser.void setExceptionHandler(ReceivingApplicationExceptionHandler exceptionHandler)
Copyright © 2001–2017 University Health Network. All rights reserved.