org.keridwen.core.data.model.progress
Enum ControllableState

java.lang.Object
  extended by java.lang.Enum<ControllableState>
      extended by org.keridwen.core.data.model.progress.ControllableState
All Implemented Interfaces:
Serializable, Comparable<ControllableState>

public enum ControllableState
extends Enum<ControllableState>

The state of a process determines if a process is running, over and if it succeeded in accomplishing its task.


Enum Constant Summary
DONE
          Indicates that the process has ended successfully.
ERROR
          Indicates that the process exited with errors.
INITIALIZING
          Denotes that the process has been initiated but is not running yet.
INTERRUPTED
          Indicates that the process has been interupted by the user.
PAUSED
          Indicates that the process is currently paused.
RUNNING
          Denotes that the process is still running.
STOPPING
          Indicates that the process is trying to stop.
UNKNOWN
          The state of the process is not known.
WARNING
          Indicates that the process has ended with warning messages.
 
Method Summary
 boolean isFinished()
          return true if the state leads to or occurs when the process is terminated (no way to be running anymore)
 boolean isRunning()
          return true if the state leads to or occurs during process run
static ControllableState valueOf(String name)
          Returns the enum constant of this type with the specified name.
static ControllableState[] 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

UNKNOWN

public static final ControllableState UNKNOWN
The state of the process is not known.


INITIALIZING

public static final ControllableState INITIALIZING
Denotes that the process has been initiated but is not running yet.


RUNNING

public static final ControllableState RUNNING
Denotes that the process is still running.


PAUSED

public static final ControllableState PAUSED
Indicates that the process is currently paused.


INTERRUPTED

public static final ControllableState INTERRUPTED
Indicates that the process has been interupted by the user.


STOPPING

public static final ControllableState STOPPING
Indicates that the process is trying to stop.


DONE

public static final ControllableState DONE
Indicates that the process has ended successfully.


WARNING

public static final ControllableState WARNING
Indicates that the process has ended with warning messages.


ERROR

public static final ControllableState ERROR
Indicates that the process exited with errors.

Method Detail

values

public static ControllableState[] 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 (ControllableState c : ControllableState.values())
    System.out.println(c);

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

valueOf

public static ControllableState 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

isFinished

public boolean isFinished()
return true if the state leads to or occurs when the process is terminated (no way to be running anymore)

Returns:

isRunning

public boolean isRunning()
return true if the state leads to or occurs during process run



Copyright © 2010-2013 Artenum. All Rights Reserved.