org.marketcetera.saclient
Class CreateStrategyParameters

java.lang.Object
  extended by org.marketcetera.saclient.CreateStrategyParameters
All Implemented Interfaces:
Serializable

public final class CreateStrategyParameters
extends Object
implements Serializable

Specifies the parameters to create a strategy.

Since:
2.0.0
Version:
$Id: CreateStrategyParameters.java 16154 2012-07-14 16:34:05Z colin $
Author:
anshul@marketcetera.com
See Also:
Serialized Form

Constructor Summary
CreateStrategyParameters(String inInstanceName, String inStrategyName, String inLanguage, File inStrategySource, String inParameters, boolean inRouteOrdersToServer)
          Creates an instance.
 
Method Summary
 String getInstanceName()
          Returns the strategy instance name.
 String getLanguage()
          Returns the strategy language.
 String getParameters()
          Returns the strategy parameters.
 String getStrategyName()
          Returns the strategy class name.
 InputStream getStrategySource()
          Returns the input stream from which the strategy script file can be read.
 boolean isRouteOrdersToServer()
          Returns true if the strategy should route its orders to the server.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CreateStrategyParameters

public CreateStrategyParameters(String inInstanceName,
                                String inStrategyName,
                                String inLanguage,
                                File inStrategySource,
                                String inParameters,
                                boolean inRouteOrdersToServer)
                         throws FileNotFoundException
Creates an instance.

Parameters:
inInstanceName - the strategy instance name. Can be null.
inStrategyName - the strategy class name. Cannot be null.
inLanguage - the strategy language. Cannot be null.
inStrategySource - the file containing the strategy source. Cannot be null.
inParameters - the strategy parameters as a list of ':' separated, name=value pairs. Can be null.
inRouteOrdersToServer - if the strategy should route its orders to the server.
Throws:
NullPointerException - if any of the non-null field values are null.
FileNotFoundException - if the inStrategySource file does not exist or if it cannot be read.
Method Detail

getInstanceName

public String getInstanceName()
Returns the strategy instance name.

Returns:
the strategy instance name.

getStrategyName

public String getStrategyName()
Returns the strategy class name.

Returns:
the strategy class name.

getLanguage

public String getLanguage()
Returns the strategy language.

Returns:
the strategy language.

getStrategySource

public InputStream getStrategySource()
                              throws IOException
Returns the input stream from which the strategy script file can be read.

The input stream should be closed once the script has been read to release the resources.

Returns:
the input stream from which the strategy script can be read.
Throws:
IOException - if there were errors getting the input stream.

getParameters

public String getParameters()
Returns the strategy parameters.

The parameters are specified as ':' separated list of name=value pairs.

Returns:
the strategy parameters.

isRouteOrdersToServer

public boolean isRouteOrdersToServer()
Returns true if the strategy should route its orders to the server.

Returns:
if the strategy should routes its orders to the server.


Copyright © 2012. All Rights Reserved.