org.marketcetera.strategy
Enum Status

java.lang.Object
  extended by java.lang.Enum<Status>
      extended by org.marketcetera.strategy.Status
All Implemented Interfaces:
Serializable, Comparable<Status>

public enum Status
extends Enum<Status>

Indicates the status of a running strategy.

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

Enum Constant Summary
COMPILING
          the strategy is being prepared and, if appropriate, compiled
FAILED
          the strategy is not running because of an error
RUNNING
          the strategy is currently running
STARTING
          the strategy is executing RunningStrategy.onStart()
STOPPED
          the strategy was started and running, but has been stopped
STOPPING
          the strategy is executing RunningStrategy.onStop()
UNSTARTED
          the strategy has been created but not yet started
 
Method Summary
 boolean isRunning()
          Indicates if the strategy is currently executing.
static Status valueOf(String name)
          Returns the enum constant of this type with the specified name.
static Status[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

UNSTARTED

public static final Status UNSTARTED
the strategy has been created but not yet started


COMPILING

public static final Status COMPILING
the strategy is being prepared and, if appropriate, compiled


STARTING

public static final Status STARTING
the strategy is executing RunningStrategy.onStart()


RUNNING

public static final Status RUNNING
the strategy is currently running


STOPPING

public static final Status STOPPING
the strategy is executing RunningStrategy.onStop()


STOPPED

public static final Status STOPPED
the strategy was started and running, but has been stopped


FAILED

public static final Status FAILED
the strategy is not running because of an error

Method Detail

values

public static Status[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (Status c : Status.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static Status valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

isRunning

public boolean isRunning()
Indicates if the strategy is currently executing.

Returns:
a boolean value


Copyright © 2012. All Rights Reserved.