com.rhi.architecture.parc
Class PipelineProcess

java.lang.Object
  extended bycom.rhi.architecture.parc.PipelineProcess
All Implemented Interfaces:
Process

public class PipelineProcess
extends java.lang.Object
implements Process

The PipelineProcess is a process instance that runs a pipeline (InputAdapter <-> Pipeline <-> OutputAdapter). It may run within a set of processes or by itself.

Since:
1.0
Author:
Pete McKinstry

Field Summary
 
Fields inherited from interface com.rhi.architecture.parc.Process
NAME, SEPARATOR, TYPE
 
Constructor Summary
PipelineProcess()
          Constructor
 
Method Summary
 void cleanup()
          Perform any cleanup required.
 AuditAgent getAuditAgent()
          Returns the auditAgent.
 ExecutionStrategy getExecutionStrategy()
          The interface application defers execution to a strategy interface.
 InputAdapter getInputAdapter()
          Return the Input Adapter that selects the work set to process.
 java.lang.String getName()
          getName returns the configured name for this process.
 OutputAdapter getOutputAdapter()
          Return the Output Adapter that persists the work set after processing is completed.
 Pipeline getPipeline()
          This method should construct a Pipeline, a set of Filters, attach those Filters to the Pipeline, and return the fully configured Pipeline to the framework for execution.
 java.util.Properties getProperties()
          get the configuration properties
 void init(java.util.Properties props)
          Init method will be called prior to run to allow the strategy to initialize itself & acquire any necessary resources.
static Logger log()
          Returns the logger instance
 void run()
          Run the Process.
 void setAuditAgent(AuditAgent auditAgent)
          Sets the auditAgent.
 void setExecutionStrategy(ExecutionStrategy strategy)
          Set the strategy
 void setInputAdapter(InputAdapter inputAdapter)
          Set the input adapter
 void setName(java.lang.String name)
          setName is called by either the ProcessSet if this Process is contained w/in a ProcessSet to provide it w/ a unique name for property lookups.
 void setOutputAdapter(OutputAdapter outputAdapter)
          Set the output adapter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PipelineProcess

public PipelineProcess()
Constructor

Method Detail

init

public void init(java.util.Properties props)
          throws InitializationException
Init method will be called prior to run to allow the strategy to initialize itself & acquire any necessary resources.

Specified by:
init in interface Process
Parameters:
props -
Throws:
InitializationException
Since:
1.0

getPipeline

public Pipeline getPipeline()
                     throws InitializationException
This method should construct a Pipeline, a set of Filters, attach those Filters to the Pipeline, and return the fully configured Pipeline to the framework for execution.

A default implementation has been provided here for the simplest case. It is driven from property file settings and assumes default constructors exist for both the Pipeline and all the Filters. It is anticipated that this will be to restrictive for many non-trivial applications. In those cases, this method should be overridden and implemented appropriately.

Returns:
Pipeline
Throws:
InitializationException
Since:
1.0

run

public void run()
         throws ProcessingException
Run the Process. For PipelineProcess, this will call strategy.run() & then outputAdapter.close()

Specified by:
run in interface Process
Throws:
ProcessingException
Since:
1.0

cleanup

public void cleanup()
Perform any cleanup required. This allows the Process to keep resources open after the run() method in case a multi-call strategy is used to execute run() repeatedly.

Specified by:
cleanup in interface Process
Since:
1.0

getName

public java.lang.String getName()
getName returns the configured name for this process. This method must return a unique identifier for each process running w/in the same BatchApplication. It is used to identify properties that are specific to a given Process.

Specified by:
getName in interface Process
Returns:
String
Since:
1.0

setName

public void setName(java.lang.String name)
setName is called by either the ProcessSet if this Process is contained w/in a ProcessSet to provide it w/ a unique name for property lookups. (name precedes properties specific to the process)

Specified by:
setName in interface Process
Parameters:
name -
Since:
1.0

getExecutionStrategy

public ExecutionStrategy getExecutionStrategy()
The interface application defers execution to a strategy interface.

Returns:
ExecutionStrategy
Since:
1.0

setExecutionStrategy

public void setExecutionStrategy(ExecutionStrategy strategy)
Set the strategy

Parameters:
strategy -
Since:
1.0

getOutputAdapter

public OutputAdapter getOutputAdapter()
Return the Output Adapter that persists the work set after processing is completed.

Returns:
OutputAdapter
Since:
1.0

setOutputAdapter

public void setOutputAdapter(OutputAdapter outputAdapter)
Set the output adapter

Parameters:
outputAdapter -
Since:
1.0

getInputAdapter

public InputAdapter getInputAdapter()
Return the Input Adapter that selects the work set to process. Typically this adapter will query the database or file system for a group of records to transform.

Returns:
InputAdapter
Since:
1.0

setInputAdapter

public void setInputAdapter(InputAdapter inputAdapter)
Set the input adapter

Parameters:
inputAdapter -
Since:
1.0

getAuditAgent

public AuditAgent getAuditAgent()
Returns the auditAgent.

Returns:
AuditAgent

setAuditAgent

public void setAuditAgent(AuditAgent auditAgent)
Sets the auditAgent.

Parameters:
auditAgent - The auditAgent to set

getProperties

public java.util.Properties getProperties()
get the configuration properties

Returns:
Properties
Since:
1.0

log

public static Logger log()
Returns the logger instance

Returns:
Logger


Copyright © 2002-2004 Robert Half International. All Rights Reserved.