|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectca.uhn.hl7v2.protocol.impl.ApplicationRouterImpl
public class ApplicationRouterImpl
A default implementation of ApplicationRouter
Note that ParseChecker is used for each inbound message, iff the system property ca.uhn.hl7v2.protocol.impl.check_parse = "TRUE".
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface ca.uhn.hl7v2.protocol.ApplicationRouter |
|---|
ApplicationRouter.AppRoutingData |
| Field Summary | |
|---|---|
static java.lang.String |
RAW_MESSAGE_KEY
Key under which raw message text is stored in metadata Map sent to ReceivingApplications. |
| Constructor Summary | |
|---|---|
ApplicationRouterImpl()
Creates an instance that uses a GenericParser. |
|
ApplicationRouterImpl(Parser theParser)
Creates an instance that uses the specified Parser. |
|
| Method Summary | |
|---|---|
void |
bindApplication(ApplicationRouter.AppRoutingData theRoutingData,
ReceivingApplication 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)
|
static boolean |
matches(ApplicationRouter.AppRoutingData theMessageData,
ApplicationRouter.AppRoutingData theReferenceData)
|
Transportable |
processMessage(Transportable theMessage)
Attempts to route the given message to the associated Application
and obtain a response. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static java.lang.String RAW_MESSAGE_KEY
ReceivingApplications.
| Constructor Detail |
|---|
public ApplicationRouterImpl()
GenericParser.
public ApplicationRouterImpl(Parser theParser)
Parser.
theParser - the parser used for converting between Message and
Transportable| Method Detail |
|---|
public Transportable processMessage(Transportable theMessage)
throws HL7Exception
ApplicationRouterApplication
and obtain a response.
processMessage in interface ApplicationRoutertheMessage - the message to route
HL7ExceptionApplicationRouter.processMessage(ca.uhn.hl7v2.protocol.Transportable)public boolean hasActiveBinding(ApplicationRouter.AppRoutingData theRoutingData)
hasActiveBinding in interface ApplicationRoutertheRoutingData - message fields used in determining the appropriate destination
ApplicationRouter.hasActiveBinding(ca.uhn.hl7v2.protocol.ApplicationRouter.AppRoutingData)
public void bindApplication(ApplicationRouter.AppRoutingData theRoutingData,
ReceivingApplication theApplication)
ApplicationRouterAssociates 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.
bindApplication in interface ApplicationRoutertheRoutingData - message fields used in determining the appropriate destinationtheApplication - the application to which messages with these parameters should be
sentApplicationRouter.bindApplication(
ca.uhn.hl7v2.protocol.ApplicationRouter.AppRoutingData, ca.uhn.hl7v2.protocol.ReceivingApplication)public void disableBinding(ApplicationRouter.AppRoutingData theRoutingData)
ApplicationRouter
disableBinding in interface ApplicationRoutertheRoutingData - the fields that define a set of messages that are bound to
some ApplicationApplicationRouter.disableBinding(ca.uhn.hl7v2.protocol.ApplicationRouter.AppRoutingData)public void enableBinding(ApplicationRouter.AppRoutingData theRoutingData)
ApplicationRouterdisableBinding(AppRoutingData theRoutingData).
enableBinding in interface ApplicationRoutertheRoutingData - the fields that define a set of messages that are bound to
some ApplicationApplicationRouter.enableBinding(ca.uhn.hl7v2.protocol.ApplicationRouter.AppRoutingData)public Parser getParser()
getParser in interface ApplicationRouterParser that is used to parse inbound messages
and encode outbound ones. It may be of interest to set certain parameters
of this parser.ApplicationRouter.getParser()
public static boolean matches(ApplicationRouter.AppRoutingData theMessageData,
ApplicationRouter.AppRoutingData theReferenceData)
theMessageData - routing data related to a particular messagetheReferenceData - routing data related to a binding, which may include
wildcardsexact - if true, each field must match exactly
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||