com.rhi.architecture.parc
Class AbstractExecutionStrategy

java.lang.Object
  extended bycom.rhi.architecture.parc.AbstractExecutionStrategy
All Implemented Interfaces:
ExecutionStrategy
Direct Known Subclasses:
ConditionalLoopStrategy, InfiniteLoopStrategy, SingleCallStrategy

public abstract class AbstractExecutionStrategy
extends java.lang.Object
implements ExecutionStrategy

Abstract Execution Strategy

Since:
1.0
Author:
Pete McKinstry

Field Summary
static java.lang.String DEFAULT_SLEEP_TIME
          the default sleep time
static java.lang.String SLEEP_TIME
          Between execution cycles, sleep for this amount of time.
 
Constructor Summary
AbstractExecutionStrategy()
           
 
Method Summary
 void cleanup()
          cleanup is called when the process is complete, allowing the strategy to close any required resources.
protected  int doRun()
          ExecutionStrategies can use this method to run the pipeline using shared standard logic.
 InputAdapter getInputAdapter()
          Get input adapter.
 OutputAdapter getOutputAdapter()
          Get output adapter.
 Pipeline getPipeline()
          Get Pipeline
protected  java.util.Properties getProperties()
          Get the configuration settings from the ConfigFacility
 long getSleepTime()
           
protected  void hookupChannels()
          Method configureChannels.
 void init(java.util.Properties p)
          init method to load properties
 void logStats(java.lang.String msg)
          Log performance statistics w/ a different logger than normal application logging messages.
 void setInputAdapter(InputAdapter ia)
          Set method to tell the strategy what input adapter to use.
 void setOutputAdapter(OutputAdapter oa)
          Set method to tell the strategy what output adapter to use.
 void setPipeline(Pipeline p)
          Set method to tell the strategy what pipeline to use.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.rhi.architecture.parc.ExecutionStrategy
run
 

Field Detail

SLEEP_TIME

public static final java.lang.String SLEEP_TIME
Between execution cycles, sleep for this amount of time.

See Also:
Constant Field Values

DEFAULT_SLEEP_TIME

public static final java.lang.String DEFAULT_SLEEP_TIME
the default sleep time

See Also:
Constant Field Values
Constructor Detail

AbstractExecutionStrategy

public AbstractExecutionStrategy()
Method Detail

init

public void init(java.util.Properties p)
Description copied from interface: ExecutionStrategy
init method to load properties

Specified by:
init in interface ExecutionStrategy
Parameters:
p -
See Also:
Resource.init(java.util.Properties)

cleanup

public void cleanup()
Description copied from interface: ExecutionStrategy
cleanup is called when the process is complete, allowing the strategy to close any required resources.

Specified by:
cleanup in interface ExecutionStrategy
See Also:
ExecutionStrategy.cleanup()

getSleepTime

public long getSleepTime()
Returns:
Returns the sleepTime.

setInputAdapter

public void setInputAdapter(InputAdapter ia)
Set method to tell the strategy what input adapter to use.

Specified by:
setInputAdapter in interface ExecutionStrategy
Parameters:
ia -
Since:
1.0

getInputAdapter

public InputAdapter getInputAdapter()
Get input adapter.

Returns:
InputAdapter
Since:
1.0

setOutputAdapter

public void setOutputAdapter(OutputAdapter oa)
Set method to tell the strategy what output adapter to use.

Specified by:
setOutputAdapter in interface ExecutionStrategy
Parameters:
oa -
Since:
1.0

getOutputAdapter

public OutputAdapter getOutputAdapter()
Get output adapter.

Returns:
OutputAdapter
Since:
1.0

setPipeline

public void setPipeline(Pipeline p)
Set method to tell the strategy what pipeline to use.

Specified by:
setPipeline in interface ExecutionStrategy
Parameters:
p -
Since:
1.0

getPipeline

public Pipeline getPipeline()
Get Pipeline

Returns:
Pipeline
Since:
1.0

doRun

protected int doRun()
             throws ProcessingException
ExecutionStrategies can use this method to run the pipeline using shared standard logic. They then wrap the doRun() method w/ whatever strategy they wish to apply while continuing to share the details.

Returns:
int - the number of records processed.
Throws:
ProcessingException
Since:
1.0

hookupChannels

protected void hookupChannels()
Method configureChannels.


getProperties

protected java.util.Properties getProperties()
                                      throws ProcessingException
Get the configuration settings from the ConfigFacility

Returns:
Properties object storing configuration data
Throws:
ProcessingException

logStats

public void logStats(java.lang.String msg)
Log performance statistics w/ a different logger than normal application logging messages.

Parameters:
msg -


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