|
||||||||||
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. |
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(java.lang.String messageType,
java.lang.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 Application
ApplicationException
- if no such Applications are registered, or if
the underlying Application throws this exception during processing.public void registerApplication(java.lang.String messageType, java.lang.String triggerEvent, Application handler)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |