java.lang.isolate
Class IsolateEvent.ExitReason

java.lang.Object
  |
  +--java.lang.isolate.IsolateEvent.ExitReason
Enclosing class:
IsolateEvent

public class IsolateEvent.ExitReason
extends Object

Provides information about how an isolate became terminated. It indicates the "reason" the isolate died.

The last valid termination cause determines the reason code. For example, if an isolate exits implicitly (IMPLICIT_EXIT), but a remote isolate issues a halt during the execution of shutdown hooks, the OTHER_HALT code will be provided as the reason.

See Also:
IsolateEvent.getExitReason()

Field Summary
static int IMPLICIT_EXIT
          The last non-daemon thread returned from main.
static int OTHER_EXIT
          Some other isolate invoked Isolate.exit on the isolate.
static int OTHER_HALT
          Some other isolate invoked Isolate.halt on the isolate.
static int SELF_EXIT
          The isolate invoked System.exit, Runtime.exit, or Isolate.exit on itself.
static int SELF_HALT
          The isolate invoked Runtime.halt or Isolate.halt on itself.
static int UNCAUGHT_EXCEPT
          The last non-daemon thread exited due to an uncaught exception.
 
Method Summary
 int getReason()
          Gets the reason that the associated isolate exited.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

IMPLICIT_EXIT

public static final int IMPLICIT_EXIT
The last non-daemon thread returned from main.

See Also:
Constant Field Values

UNCAUGHT_EXCEPT

public static final int UNCAUGHT_EXCEPT
The last non-daemon thread exited due to an uncaught exception.

If a daemon thread dies with an uncaught exception, that will not cause the containing isolate to die. Additionally, only if the last non-daemon thread dies with an uncaught exception will this reason be noted. Uncaught exceptions in shutdown hooks do not count, either.

See Also:
Constant Field Values

SELF_EXIT

public static final int SELF_EXIT
The isolate invoked System.exit, Runtime.exit, or Isolate.exit on itself.

See Also:
Constant Field Values

SELF_HALT

public static final int SELF_HALT
The isolate invoked Runtime.halt or Isolate.halt on itself.

See Also:
Constant Field Values

OTHER_EXIT

public static final int OTHER_EXIT
Some other isolate invoked Isolate.exit on the isolate.

See Also:
Constant Field Values

OTHER_HALT

public static final int OTHER_HALT
Some other isolate invoked Isolate.halt on the isolate.

See Also:
Constant Field Values
Method Detail

getReason

public int getReason()
Gets the reason that the associated isolate exited.

Returns:
an integer code indicating why the isolate exited.