public class PNProcessEvent
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
BLOCKED_ON_DELAY
A process is blocked on a delay.
|
static int |
BLOCKED_ON_MUTATION
A process is blocked on a mutation.
|
static int |
BLOCKED_ON_READ
A process is blocked on a read.
|
static int |
BLOCKED_ON_WRITE
A process is blocked on a write.
|
static int |
FINISHED_ABRUPTLY
A process finished abruptly.
|
static int |
FINISHED_PROPERLY
A process finished properly.
|
static int |
FINISHED_WITH_EXCEPTION
A process finished with an exception.
|
static int |
PROCESS_BLOCKED
The process is in the blocked state.
|
static int |
PROCESS_FINISHED
The process is in the finished state.
|
static int |
PROCESS_PAUSED
The process is in the paused state.
|
static int |
PROCESS_RUNNING
The process is in the running state.
|
Constructor and Description |
---|
PNProcessEvent(Actor actor,
java.lang.Exception exception)
Create a new event that corresponds to an exception
caught by the process.
|
PNProcessEvent(Actor actor,
int state)
Create a new event.
|
PNProcessEvent(Actor actor,
int state,
int cause)
Create a new event that corresponds to an exception
caught by the process.
|
Modifier and Type | Method and Description |
---|---|
Actor |
getActor()
Return the actor corresponding to the process that generated
the event.
|
int |
getBlockingCause()
Return the cause of the blocking state.
|
int |
getCurrentState()
Return the current state.
|
java.lang.Exception |
getException()
Return the exception associated with the event.
|
int |
getFinishingCause()
Return the cause of the finishing state.
|
java.lang.String |
toString()
Return the string value of this event.
|
public static final int BLOCKED_ON_DELAY
public static final int BLOCKED_ON_MUTATION
public static final int BLOCKED_ON_READ
public static final int BLOCKED_ON_WRITE
public static final int FINISHED_ABRUPTLY
public static final int FINISHED_PROPERLY
public static final int FINISHED_WITH_EXCEPTION
public static final int PROCESS_BLOCKED
public static final int PROCESS_FINISHED
public static final int PROCESS_PAUSED
public static final int PROCESS_RUNNING
public PNProcessEvent(Actor actor, int state)
actor
- The actorstate
- The state of the actor, should be one of
PROCESS_BLOCKED, PROCESS_FINISHED, PROCESS_PAUSED
or PROCESS_RUNNING.public PNProcessEvent(Actor actor, int state, int cause)
actor
- The actor.state
- The state of the actor, should be one of
PROCESS_BLOCKED, PROCESS_FINISHED, PROCESS_PAUSED
or PROCESS_RUNNING.cause
- The cause of the state.public PNProcessEvent(Actor actor, java.lang.Exception exception)
actor
- The actor.exception
- The exception.public Actor getActor()
public int getBlockingCause()
public int getCurrentState()
public java.lang.Exception getException()
public int getFinishingCause()
public java.lang.String toString()
toString
in class java.lang.Object