ca.uhn.hl7v2.protocol
Interface ApplicationRouter

All Known Implementing Classes:
ApplicationRouterImpl

public interface ApplicationRouter

Routes messages to the appropriate application.

Version:
$Revision: 1.1 $ updated on $Date: 2007/02/19 02:24:38 $ by $Author: jamesagnew $
Author:
Bryan Tripp

Nested Class Summary
static interface ApplicationRouter.AppRoutingData
          Encapsulates the message fields used for routing of messages from the HL7 protocol to the appropriate Application.
 
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)
           
 Transportable processMessage(Transportable theMessage)
          Attempts to route the given message to the associated Application and obtain a response.
 

Method Detail

processMessage

Transportable processMessage(Transportable theMessage)
                             throws HL7Exception
Attempts to route the given message to the associated Application and obtain a response.

Parameters:
theMessage - the message to route
Returns:
the response message (this may be null, for example if the given message doesn't require an application ACK)
Throws:
HL7Exception

hasActiveBinding

boolean hasActiveBinding(ApplicationRouter.AppRoutingData theRoutingData)
Parameters:
theRoutingData - message fields used in determining the appropriate destination
Returns:
true if there is a destination application for messages with the given characteristics

bindApplication

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. 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.

Parameters:
theRoutingData - message fields used in determining the appropriate destination
theApplication - the application to which messages with these parameters should be sent

disableBinding

void disableBinding(ApplicationRouter.AppRoutingData theRoutingData)
Temporarily deactivates the binding on the given field data, if present.

Parameters:
theRoutingData - the fields that define a set of messages that are bound to some Application

enableBinding

void enableBinding(ApplicationRouter.AppRoutingData theRoutingData)
Undoes disableBinding(AppRoutingData theRoutingData).

Parameters:
theRoutingData - the fields that define a set of messages that are bound to some Application

getParser

Parser getParser()
Returns:
the Parser that is used to parse inbound messages and encode outbound ones. It may be of interest to set certain parameters of this parser.


Copyright © 2001-2011 University Health Network. All Rights Reserved.