public class ActivityState
extends java.lang.Object
implements java.io.Serializable
REGISTERED. Meanwhile the
corresponding component is being instantiated and the runtime environment is
prepared for the execution of the component. Afterwards the component itself
is INITIALISING which is reflected in the corresponding state.
As soon as the initialisation has successfully finished, the component
executes and the state changes to RUNNING. When the component
has terminated (finished, suspended, aborted, reset) or an exception occurred
either during normal execution or even while initialising, the state changes
to TERMINATING while the runtime environment is performing the
necessary clean-up. At last the state is TERMINATED. TERMINATED_PENDING.
Note that an ActivityState is read-only; when changing the state
a new ActivityState needs to be created. This also avoids the
need for synchronising access to this class.
| Modifier and Type | Class and Description |
|---|---|
static class |
ActivityState.State
An enumeration for the state of the component of an activity.
|
| Modifier | Constructor and Description |
|---|---|
|
ActivityState(ActivityState.State state)
Creates a new
ActivityState for the designated (simple) state. |
protected |
ActivityState(ActivityState.State state,
int signal)
Creates a new
ActivityState having the designated state and
the designated signal. |
|
ActivityState(int signal)
Creates a new
ActivityState for a RUNNING
component having received the designated signal. |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Integer |
getLastSignal()
Gets the last signal sent to the component of an activity or
null in case no signal has been sent yet. |
ActivityState.State |
getState()
Gets the current (simple) state of the component of an activity.
|
public ActivityState(ActivityState.State state)
ActivityState for the designated (simple) state.
No signal will be set.state - The (simple) state for the created ActivityState.public ActivityState(int signal)
ActivityState for a RUNNING
component having received the designated signal.signal - The signal sent to the running component.protected ActivityState(ActivityState.State state, int signal)
ActivityState having the designated state and
the designated signal. This is for subclasses only that need more control
over the state and the signal.state - The (simple) state for the created ActivityState.signal - The signal sent to the running component.public ActivityState.State getState()
public java.lang.Integer getLastSignal()
null in case no signal has been sent yet.null in case no signal has been sent yet.