org.marketcetera.strategy
Interface Strategy


public interface Strategy

A Strategy object to be executed.

Since:
1.0.0
Version:
$Id: Strategy.java 16154 2012-07-14 16:34:05Z colin $
Author:
Colin DuPlantis

Field Summary
static String CLASSPATH_PROPERTYNAME
          environment property name used to indicate the source directory of included strategy scripts
static String STRATEGY_MESSAGES
          logger category which collects strategy messages
 
Method Summary
 void dataReceived(Object inData)
          Sends data received from an external source to a strategy.
 String getDefaultNamespace()
          Returns the default namespace for this strategy.
 org.marketcetera.strategy.Executor getExecutor()
          Returns the executor used to execute this strategy, if one has been assigned.
 Language getLanguage()
          Gets the language in which to interpret the strategy script.
 String getName()
          Get the name value.
 Properties getParameters()
          Gets the parameters to pass to the strategy script.
 String getScript()
          Gets the script to execute.
 org.marketcetera.strategy.ServicesProvider getServicesProvider()
          Returns the services provider for this Strategy to use.
 Status getStatus()
          Gets the strategy status.
 void start()
          Starts the execution of the strategy.
 void stop()
          Stops the execution of the strategy.
 

Field Detail

STRATEGY_MESSAGES

static final String STRATEGY_MESSAGES
logger category which collects strategy messages

See Also:
Constant Field Values

CLASSPATH_PROPERTYNAME

static final String CLASSPATH_PROPERTYNAME
environment property name used to indicate the source directory of included strategy scripts

See Also:
Constant Field Values
Method Detail

dataReceived

void dataReceived(Object inData)
Sends data received from an external source to a strategy.

Parameters:
inData - an Object value

getScript

String getScript()
Gets the script to execute.

Returns:
a String value

getLanguage

Language getLanguage()
Gets the language in which to interpret the strategy script.

Returns:
a Language value

getName

String getName()
Get the name value.

Returns:
a String value

getParameters

Properties getParameters()
Gets the parameters to pass to the strategy script.

Returns:
a Properties value

start

void start()
           throws StrategyException
Starts the execution of the strategy.

Throws:
StrategyException - if the strategy cannot start

stop

void stop()
          throws Exception
Stops the execution of the strategy.

Throws:
Exception - if an error occurred while stopping the strategy

getStatus

Status getStatus()
Gets the strategy status.

Returns:
a Status value

getServicesProvider

org.marketcetera.strategy.ServicesProvider getServicesProvider()
Returns the services provider for this Strategy to use.

Returns:
a ServicesProvider value

getDefaultNamespace

String getDefaultNamespace()
Returns the default namespace for this strategy.

Returns:
a String value

getExecutor

org.marketcetera.strategy.Executor getExecutor()
Returns the executor used to execute this strategy, if one has been assigned.

Returns:
an Executor value or null depending on the progress of the strategy in its lifecycle


Copyright © 2012. All Rights Reserved.