ca.uhn.hl7v2.protocol.impl
Class ProcessorContextImpl

java.lang.Object
  extended by ca.uhn.hl7v2.protocol.impl.ProcessorContextImpl
All Implemented Interfaces:
ProcessorContext

public class ProcessorContextImpl
extends java.lang.Object
implements ProcessorContext

Default implementation of ProcessorContext.

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

Constructor Summary
ProcessorContextImpl(ApplicationRouter theRouter, TransportLayer theTransport, SafeStorage theStorage)
          Creates a new instance that uses the given resources.
ProcessorContextImpl(ApplicationRouter theRouter, TransportLayer theLocallyDrivenTransport, TransportLayer theRemotelyDrivenTransport, SafeStorage theStorage)
          Creates a new instance that uses the given resources.
 
Method Summary
 void addValidator(AcceptValidator theValidator)
          Adds a new validator to the list of those returned by getValidators().
 TransportLayer getLocallyDrivenTransportLayer()
           
 java.util.List getMetadataFields()
          Returns the list of fields that are to be included as metadata whenever a Message is converted to a Transportable.
 TransportLayer getRemotelyDrivenTransportLayer()
           
 ApplicationRouter getRouter()
           
 SafeStorage getSafeStorage()
           
 AcceptValidator[] getValidators()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProcessorContextImpl

public ProcessorContextImpl(ApplicationRouter theRouter,
                            TransportLayer theTransport,
                            SafeStorage theStorage)
Creates a new instance that uses the given resources.

Parameters:
theRouter -
theTransport - a TransportLayer used for both locally-initiated and remotely-initiated message exchanges
theStorage -

ProcessorContextImpl

public ProcessorContextImpl(ApplicationRouter theRouter,
                            TransportLayer theLocallyDrivenTransport,
                            TransportLayer theRemotelyDrivenTransport,
                            SafeStorage theStorage)
Creates a new instance that uses the given resources.

Parameters:
theRouter -
theLocallyDrivenTransport - a TransportLayer used for locally-initiated and message exchanges
theRemotelyDrivenTransport - a TransportLayer used for remotely-initiated and message exchanges
theStorage -
Method Detail

getRouter

public ApplicationRouter getRouter()
Specified by:
getRouter in interface ProcessorContext
Returns:
the router that directs unsolicited inbound messages to the appropriate Application
See Also:
ProcessorContext.getRouter()

getRemotelyDrivenTransportLayer

public TransportLayer getRemotelyDrivenTransportLayer()
Specified by:
getRemotelyDrivenTransportLayer in interface ProcessorContext
Returns:
the object responsible for transport of remotely initiated message exchanges (normally with a remote server)
See Also:
ProcessorContext.getRemotelyDrivenTransportLayer()

getLocallyDrivenTransportLayer

public TransportLayer getLocallyDrivenTransportLayer()
Specified by:
getLocallyDrivenTransportLayer in interface ProcessorContext
Returns:
the object responsible for transport of locally initiated message exchanges (normally with a remote server)
See Also:
ProcessorContext.getLocallyDrivenTransportLayer()

getValidators

public AcceptValidator[] getValidators()
Specified by:
getValidators in interface ProcessorContext
Returns:
the validators that determine whether a message can be accepted for routing to the appropriate application
See Also:
ProcessorContext.getValidators()

addValidator

public void addValidator(AcceptValidator theValidator)
Adds a new validator to the list of those returned by getValidators().

Specified by:
addValidator in interface ProcessorContext
Parameters:
theValidator - the validator to add

getSafeStorage

public SafeStorage getSafeStorage()
Specified by:
getSafeStorage in interface ProcessorContext
Returns:
a store for messages while they are being routed to the appropriate application
See Also:
ProcessorContext.getSafeStorage()

getMetadataFields

public java.util.List getMetadataFields()
Description copied from interface: ProcessorContext
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.

Specified by:
getMetadataFields in interface ProcessorContext
See Also:
ProcessorContext.getMetadataFields()


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