|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--java.util.EventObject
|
+--java.lang.isolate.IsolateEvent
Isolate events represent state changes in an isolate lifecycle.
Isolate events are issued when the isolate changes its execution
state (to STARTING, STOPPING, and finally TERMINATED). Isolate events are initially delivered on a
Link associated with the source isolate and obtained
via newEventLink() but may be
forwarded over other links subsequently.
All events have a "type" (see getType()) and provide a
handle to the isolate associated with the event (see getIsolate()). The TERMINATED events have an integer exit
status (available via getExitStatus()) associated with them
and exit "reason codes" (available via getExitReason()).
The other event types have no additional information available.
The source of the
EventObject view of an IsolateEvent is the
Isolate object associated with the event.
Isolate.newEventLink(java.lang.isolate.Isolate),
Serialized Form| Nested Class Summary | |
class |
IsolateEvent.ExitReason
Provides information about how an isolate became terminated. |
| Field Summary | |
static int |
STARTING
The starting state. |
static int |
STOPPING
The stopping state. |
static int |
TERMINATED
The terminated state. |
| Constructor Summary | |
IsolateEvent(java.lang.isolate.Isolate isolate,
int type,
int status)
Constructs an IsolateEvent with the given type and exit status. |
|
| Method Summary | |
IsolateEvent.ExitReason |
getExitReason()
Gets information about how an isolate died. |
int |
getExitStatus()
Gets the exit status of an Isolate. |
java.lang.isolate.Isolate |
getIsolate()
Gets the Isolate instance associated with this
IsolateEvent. |
int |
getType()
Gets the type of this event. |
| Methods inherited from class java.util.EventObject |
getSource, toString |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int STARTING
STARTING event results from an
isolate's start method being invoked and
indicates execution of user code is able to commence.
At most one STARTING event will be delivered on
behalf of an isolate and
no isolate event will be delivered before a STARTING
event.
public static final int STOPPING
STOPPING event results from any one of a number of
actions that may initiate shutdown of an isolate:
Runtime.exit or Runtime.halt.Isolate.exit or Isolate.halt on the isolate.Runtime.halt.At most, one STOPPING event will be delivered on
behalf of an isolate, even if any of the above occur more
than once for that isolate. A STOPPING event will
always be preceded by a STARTING event. Additional code
such as shutdown hooks or finalizers may be executed by an isolate after a
STOPPING event is issued.
System.exit(int),
Runtime.exit(int),
Runtime.halt(int),
Isolate.exit(int),
Isolate.halt(int),
Constant Field Valuespublic static final int TERMINATED
TERMINATED event is supplied when an isolate has
terminated. This event is issued at the point when no additional
user code will execute in the associated isolate.
The exit code of the associated isolate is available via the
getExitStatus() method. The exit status of an isolate
defaults to 0 but will be set to the parameter passed to the
exit or halt method
that terminated the isolate. If such exit methods are invoked
multiple times, the exit status may be any one of the provided
values, with the restriction that all TERMINATED events
report the same value for the associated isolate.
At most one TERMINATED event will be delivered on
behalf of an isolate to a particular event link. A
TERMINATED event will always be preceded by a
STOPPING event.
Additionally, no more events will be delivered following
a TERMINATED event.
Isolate.isTerminated(),
System.exit(int),
Runtime.exit(int),
Runtime.halt(int),
Isolate.exit(int),
Isolate.halt(int),
Constant Field Values| Constructor Detail |
public IsolateEvent(java.lang.isolate.Isolate isolate,
int type,
int status)
isolate must not be null and the
type, and status parameters must
be valid and consistent.
| Method Detail |
public java.lang.isolate.Isolate getIsolate()
Isolate instance associated with this
IsolateEvent. Equivalent to:
(Isolate)(isoEvent.getSource())
Isolate associated with this event.public int getType()
STARTING, STOPPING, or TERMINATED.
public int getExitStatus()
TERMINATED event.
IllegalStateException - if not a TERMINATED eventpublic IsolateEvent.ExitReason getExitReason()
TERMINATED event.
IllegalStateException - if not a TERMINATED event
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||