cz.zcu.fav.kiv.jsim
Enum JSimProcessState

java.lang.Object
  extended by java.lang.Enum<JSimProcessState>
      extended by cz.zcu.fav.kiv.jsim.JSimProcessState
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<JSimProcessState>

public enum JSimProcessState
extends java.lang.Enum<JSimProcessState>

Process state can be one of the following constants:

Since:
J-Sim version 0.6.0
Version:
J-Sim version 0.6.0
Author:
Jarda KAČER

Enum Constant Summary
ACTIVE
          A process is active if it is running just now.
BLOCKED_ON_MESSAGE_RECEIVE
          A process gets blocked on receiving a message if the blocking version of the receive method is used and no message is currently available to be read.
BLOCKED_ON_MESSAGE_SEND
          A process gets blocked on sending a message if the blocking version of the send method is used and the receiver is not ready yet to read the message.
BLOCKED_ON_SEMAPHORE
          A process gets blocked on a semaphore if it invokes its P() method and the semaphore's internal counter is equal to zero.
NEW
          A process is new if it has been created but not started and not scheduled yet.
PASSIVE
          A process is passive if it has been started and it has no event in the calendar.
SCHEDULED
          A process is scheduled if it has an event in the calendar so it will run in the future.
TERMINATED
          A process is terminated if it has reached the end of its life() method.
 
Field Summary
private  java.lang.String humanReadableDescription
          A human-readable description of the process state.
 
Method Summary
 java.lang.String toString()
          Returns a human-readable description of the process state.
static JSimProcessState valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static JSimProcessState[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

NEW

public static final JSimProcessState NEW
A process is new if it has been created but not started and not scheduled yet.


PASSIVE

public static final JSimProcessState PASSIVE
A process is passive if it has been started and it has no event in the calendar.


SCHEDULED

public static final JSimProcessState SCHEDULED
A process is scheduled if it has an event in the calendar so it will run in the future.


ACTIVE

public static final JSimProcessState ACTIVE
A process is active if it is running just now.


BLOCKED_ON_SEMAPHORE

public static final JSimProcessState BLOCKED_ON_SEMAPHORE
A process gets blocked on a semaphore if it invokes its P() method and the semaphore's internal counter is equal to zero.


BLOCKED_ON_MESSAGE_SEND

public static final JSimProcessState BLOCKED_ON_MESSAGE_SEND
A process gets blocked on sending a message if the blocking version of the send method is used and the receiver is not ready yet to read the message.


BLOCKED_ON_MESSAGE_RECEIVE

public static final JSimProcessState BLOCKED_ON_MESSAGE_RECEIVE
A process gets blocked on receiving a message if the blocking version of the receive method is used and no message is currently available to be read.


TERMINATED

public static final JSimProcessState TERMINATED
A process is terminated if it has reached the end of its life() method.

Field Detail

humanReadableDescription

private final java.lang.String humanReadableDescription
A human-readable description of the process state.

Method Detail

values

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

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

valueOf

public static JSimProcessState valueOf(java.lang.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:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name

toString

public java.lang.String toString()
Returns a human-readable description of the process state.

Overrides:
toString in class java.lang.Enum<JSimProcessState>
Returns:
A human-readable description of the process state.
See Also:
Enum.toString()


Copyright © 2000-2006 University of West Bohemia. Licensed under the Academic Free License v. 2.1. Build date 20060812.