All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ca.uhn.hl7v2.protocol.ProcessorContext Maven / Gradle / Ivy

/*
 * Created on 16-Apr-2004
 */
package ca.uhn.hl7v2.protocol;

import java.util.List;

/**
 * The operational context of a Processor.  This defines 
 * certain resources that are not part of the Processor, 
 * but are needed in order to implement it, and may vary between  
 * deployments.  
 * 
 * @author Bryan Tripp
 * @version $Revision: 1.1 $ updated on $Date: 2007-02-19 02:24:38 $ by $Author: jamesagnew $
 */
public interface ProcessorContext {

    /**
     * @return the router that directs unsolicited inbound messages to 
     *      the appropriate Application  
     */
    public ApplicationRouter getRouter();

    /**
     * @return the object responsible for transport of remotely initiated message 
     *      exchanges (normally with a remote server)
     */    
    public TransportLayer getRemotelyDrivenTransportLayer();
    
    
    /**
     * @return the object responsible for transport of locally initiated message 
     *      exchanges (normally with a remote server)
     */    
    public TransportLayer getLocallyDrivenTransportLayer();

    /**
     * @return the validators that determine whether a message can be 
     *      accepted for routing to the appropriate application 
     */    
    public AcceptValidator[] getValidators();
    
    /**
     * Adds a new validator to the list of those returned by 
     * getValidators().  
     *  
     * @param theValidator the validator to add 
     */
    public void addValidator(AcceptValidator theValidator);    
    
    /**
     * @return a store for messages while they are being routed to the 
     *      appropriate application 
     */
    public SafeStorage getSafeStorage();
    
    /**
     * Returns the list of fields that are to be included as metadata whenever a Message
     * is converted to a Transportable.  Each field is a String Terser
     * path.  
     *  
     * @param theMetadataFields list of Terser paths of metadata fields 
     */
    public List getMetadataFields();
    
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy