org.marketcetera.strategy
Interface StrategyMXBean


@MXBean(value=true)
public interface StrategyMXBean

MXBean interface for Strategies.

Any changes made using the setters in this interface require the implementing module to be restarted before the changes take effect.

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

Method Summary
 Language getLanguage()
          Gets the strategy language.
 String getName()
          Gets the strategy class name.
 String getOutputDestination()
          Returns the current destination for output created by this strategy.
 String getParameters()
          Returns the current strategy parameters.
 String getStatus()
          Gets the strategy status.
 boolean isRoutingOrdersToORS()
          Indicates if the strategy is configured to route orders to the ORS.
 void setOutputDestination(String inDestination)
          Sets the destination for output created by this strategy.
 void setParameters(String inParameters)
          Sets the strategy parameters.
 void setRoutingOrdersToORS(boolean inValue)
          Determines if the strategy is configured to route orders to the ORS.
 

Method Detail

setParameters

void setParameters(String inParameters)
Sets the strategy parameters.

This method assumes that the String consists of a series of key/value pairs separated by the Util.KEY_VALUE_DELIMITER. The key/value pairs themselves are separated by the Util.KEY_VALUE_SEPARATOR. Any malformed entries are discarded. A best-effort will be made to retain as many key/value pairs as possible.

Parameters:
inParameters - a String value or null. If null or of zero-length, the current parameters are removed. All current values are replaced by the values specifed in inParameters.

getParameters

String getParameters()
Returns the current strategy parameters.

This method returns a String containing a series of key/value pairs representing the strategy parameters. Each key/value pair is separated by the Util.KEY_VALUE_DELIMITER. The pairs themselves are separated by Util.KEY_VALUE_SEPARATOR.

Note that if any of the keys or values of the Properties object contains either the Util.KEY_VALUE_DELIMITER or the Util.KEY_VALUE_SEPARATOR character, the resulting String will not be paresable with setParameters(String).

Returns:
a String value containing the current parameter settings or null if the current settings are empty.

setOutputDestination

void setOutputDestination(String inDestination)
Sets the destination for output created by this strategy.

The value passed must be a representation of a ModuleURN corresponding to a valid, started module which implements DataReceiver. If inDestination is null or empty, the current destination, if any, is disconnected.

Note that this method will have no effect on any data flows established externally.

Parameters:
inDestination - a String value containing a valid, started DataReceiver ModuleURN or null
Throws:
IllegalArgumentException - if inDestination cannot be parsed as a ModuleURN

getOutputDestination

String getOutputDestination()
Returns the current destination for output created by this strategy.

Returns:
a String value containing a String representation of a ModuleURN or null if no destination has been established.

isRoutingOrdersToORS

boolean isRoutingOrdersToORS()
Indicates if the strategy is configured to route orders to the ORS.

Returns:
a boolean value

setRoutingOrdersToORS

void setRoutingOrdersToORS(boolean inValue)
Determines if the strategy is configured to route orders to the ORS.

Parameters:
inValue - a boolean value

getStatus

String getStatus()
Gets the strategy status.

Returns:
a String value corresponding to a value in Status.

getName

String getName()
Gets the strategy class name.

Returns:
the strategy class name.

getLanguage

Language getLanguage()
Gets the strategy language.

Returns:
the strategy language.


Copyright © 2012. All Rights Reserved.