| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| ProcessorContext |
|
| 1.0;1 |
| 1 | /* | |
| 2 | * Created on 16-Apr-2004 | |
| 3 | */ | |
| 4 | package ca.uhn.hl7v2.protocol; | |
| 5 | ||
| 6 | import java.util.List; | |
| 7 | ||
| 8 | /** | |
| 9 | * The operational context of a <code>Processor</code>. This defines | |
| 10 | * certain resources that are not part of the <code>Processor</code>, | |
| 11 | * but are needed in order to implement it, and may vary between | |
| 12 | * deployments. | |
| 13 | * | |
| 14 | * @author <a href="mailto:bryan.tripp@uhn.on.ca">Bryan Tripp</a> | |
| 15 | * @version $Revision: 1.1 $ updated on $Date: 2007-02-19 02:24:38 $ by $Author: jamesagnew $ | |
| 16 | */ | |
| 17 | public interface ProcessorContext { | |
| 18 | ||
| 19 | /** | |
| 20 | * @return the router that directs unsolicited inbound messages to | |
| 21 | * the appropriate <code>Application</code> | |
| 22 | */ | |
| 23 | public ApplicationRouter getRouter(); | |
| 24 | ||
| 25 | /** | |
| 26 | * @return the object responsible for transport of remotely initiated message | |
| 27 | * exchanges (normally with a remote server) | |
| 28 | */ | |
| 29 | public TransportLayer getRemotelyDrivenTransportLayer(); | |
| 30 | ||
| 31 | ||
| 32 | /** | |
| 33 | * @return the object responsible for transport of locally initiated message | |
| 34 | * exchanges (normally with a remote server) | |
| 35 | */ | |
| 36 | public TransportLayer getLocallyDrivenTransportLayer(); | |
| 37 | ||
| 38 | /** | |
| 39 | * @return the validators that determine whether a message can be | |
| 40 | * accepted for routing to the appropriate application | |
| 41 | */ | |
| 42 | public AcceptValidator[] getValidators(); | |
| 43 | ||
| 44 | /** | |
| 45 | * Adds a new validator to the list of those returned by | |
| 46 | * <code>getValidators()</code>. | |
| 47 | * | |
| 48 | * @param theValidator the validator to add | |
| 49 | */ | |
| 50 | public void addValidator(AcceptValidator theValidator); | |
| 51 | ||
| 52 | /** | |
| 53 | * @return a store for messages while they are being routed to the | |
| 54 | * appropriate application | |
| 55 | */ | |
| 56 | public SafeStorage getSafeStorage(); | |
| 57 | ||
| 58 | /** | |
| 59 | * Returns the list of fields that are to be included as metadata whenever a <code>Message</code> | |
| 60 | * is converted to a <code>Transportable</code>. Each field is a String <code>Terser</code> | |
| 61 | * path. | |
| 62 | * | |
| 63 | * @param theMetadataFields list of <code>Terser</code> paths of metadata fields | |
| 64 | */ | |
| 65 | public List<String> getMetadataFields(); | |
| 66 | ||
| 67 | } |