|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectca.uhn.hl7v2.app.MessageTypeRouter
public class MessageTypeRouter
Routes messages to various Applications based on message type and trigger
event. The router is told which Application to which to route various
messages by calling the method registerApplication(...).
| Constructor Summary | |
|---|---|
MessageTypeRouter()
Creates a new instance of MessageTypeRouter |
|
| Method Summary | |
|---|---|
boolean |
canProcess(Message in)
Returns true if at least one application has been registered to accept this type of message. |
String |
processException(String incomingMessage,
String outgoingMessage,
Exception e)
Forwards the given exception to all Applications. |
Message |
processMessage(Message in)
Forwards the given message to any Applications that have been registered to accept messages of that type and trigger event. |
void |
registerApplication(String messageType,
String triggerEvent,
Application handler)
Registers the given application to handle messages corresponding to the given type and trigger event. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MessageTypeRouter()
| Method Detail |
|---|
public boolean canProcess(Message in)
registerApplication(...).
canProcess in interface Application
public Message processMessage(Message in)
throws ApplicationException
processMessage in interface ApplicationApplicationException - if no such Applications are registered, or if the underlying
Application throws this exception during processing.
public String processException(String incomingMessage,
String outgoingMessage,
Exception e)
throws HL7Exception
processException in interface ApplicationExceptionHandlerincomingMessage - the incoming message. This is the raw message which was
received from the external systemoutgoingMessage - the outgoing message. The response NAK message generated by
HAPI.e - the exception
outgoingMessage, or may be replaced with
another message.
HL7Exception
public void registerApplication(String messageType,
String triggerEvent,
Application handler)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||