JanosVM v1.0 API

edu.utah.janosvm.kit.isolate
Class Isolate

java.lang.Object
  |
  +--edu.utah.janosvm.kit.isolate.Isolate
All Implemented Interfaces:
java.lang.Cloneable

public final class Isolate
extends java.lang.Object
implements java.lang.Cloneable

A basic implementation of the JSR-121 Isolate API.


Field Summary
private  java.lang.String[] args
          The list of args for mainClassName's main method.
private  java.util.Vector children
          The list of children of this Isolate.
private static java.lang.String classGroupName
          The name of the class group in the config file that has all the Isolate classes.
private  EventTeamHandle eth
          Reference to the team, local or remote.
private  int id
          The unique team identifier.
private  IsolateEventHandler ieh
          A TeamList listener for this Isolate object.
private  java.lang.String mainClassName
          The name of the class whose `main' method should be run.
private  java.lang.String name
          The Isolate program name since the team name is anonymous.
private  Isolate parent
          The Isolate parent.
private  int state
          The approximate state of the isolate.
(package private) static int STATE_DEAD
           
(package private) static int STATE_DYING
           
(package private) static int STATE_FINISHED
           
(package private) static int STATE_INVALID
          The possible state's for the Isolate object.
(package private) static int STATE_NEWBORN
           
(package private) static int STATE_RUNNING
           
(package private) static int STATE_SUSPENDED
           
private static java.lang.Class thisClass
          Reference to the java Class object to be used with Team.setClassLocal/getClassLocal.
 
Constructor Summary
private Isolate()
           
private Isolate(EventTeamHandle current, java.lang.String name)
          Construct the Isolate object that refers to another team.
  Isolate(java.lang.String mainClassName, java.lang.String[] args, java.lang.String[] classpath, java.lang.String name)
           
private Isolate(Team current, java.lang.String mainClassName, java.lang.String[] args, java.lang.String name)
          Construct the Isolate object that is local to a team.
 
Method Summary
(package private) static void ()
           
 java.lang.Object clone()
           
 boolean equals(Isolate isolate)
           
 Isolate[] getChildren()
           
static Isolate getCurrentIsolate()
           
(package private)  int getID()
           
static Isolate getIsolate(java.lang.String uniqueId)
           
 java.lang.String getName()
           
 Isolate getParent()
           
(package private)  int getState()
           
 java.lang.String getUniqueId()
           
 boolean isStarted()
           
 boolean isStopped()
           
 boolean isSuspended()
           
 void join()
           
 void join(long millis)
           
 void join(long millis, int nanos)
           
(package private)  void removeMapping()
           
 void resume()
           
(package private)  void setState(int state)
           
 void start()
           
 void stop()
           
 void suspend()
           
(package private)  void waitForState(int state, long millis, int nanos)
          Wait for the Isolate to progress to a given state or time out.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait, wait0
 

Field Detail

thisClass

private static java.lang.Class thisClass
Reference to the java Class object to be used with Team.setClassLocal/getClassLocal.

classGroupName

private static java.lang.String classGroupName
The name of the class group in the config file that has all the Isolate classes.

STATE_INVALID

static final int STATE_INVALID
The possible state's for the Isolate object.

STATE_NEWBORN

static final int STATE_NEWBORN

STATE_RUNNING

static final int STATE_RUNNING

STATE_SUSPENDED

static final int STATE_SUSPENDED

STATE_FINISHED

static final int STATE_FINISHED

STATE_DYING

static final int STATE_DYING

STATE_DEAD

static final int STATE_DEAD

eth

private EventTeamHandle eth
Reference to the team, local or remote.

name

private java.lang.String name
The Isolate program name since the team name is anonymous.

state

private int state
The approximate state of the isolate.

ieh

private IsolateEventHandler ieh
A TeamList listener for this Isolate object. This is used to listen for changes in the Isolate's team state.

mainClassName

private java.lang.String mainClassName
The name of the class whose `main' method should be run.

args

private java.lang.String[] args
The list of args for mainClassName's main method.

id

private int id
The unique team identifier.

parent

private Isolate parent
The Isolate parent.

children

private java.util.Vector children
The list of children of this Isolate.
Constructor Detail

Isolate

private Isolate()

Isolate

private Isolate(Team current,
                java.lang.String mainClassName,
                java.lang.String[] args,
                java.lang.String name)
Construct the Isolate object that is local to a team.
Parameters:
current - The team this Isolate corresponds too.
mainClassName - The class to run.
args - The arguments for the `main' method of the class.
name - The name to give the Isolate program.

Isolate

private Isolate(EventTeamHandle current,
                java.lang.String name)
Construct the Isolate object that refers to another team.
Parameters:
current - A handle on the other team.
name - The name of the Isolate.

Isolate

public Isolate(java.lang.String mainClassName,
               java.lang.String[] args,
               java.lang.String[] classpath,
               java.lang.String name)
        throws java.lang.SecurityException,
               UnavailableIsolateFeatureException
Method Detail

static void ()

getName

public java.lang.String getName()

getID

int getID()
Returns:
The Isolate's team identifier.

getUniqueId

public java.lang.String getUniqueId()

getState

int getState()
Returns:
The state of the Isolate.

setState

void setState(int state)
Parameters:
state - The state of the Isolate. If the state is valid it will signal any objects that might be waiting for a state change.

waitForState

void waitForState(int state,
                  long millis,
                  int nanos)
Wait for the Isolate to progress to a given state or time out.
Parameters:
state - The state to wait for.
millis - The number of milliseconds to wait.
nanos - The number of nanoseconds to wait.

removeMapping

void removeMapping()

getIsolate

public static Isolate getIsolate(java.lang.String uniqueId)
                          throws InaccessibleIsolateException

start

public void start()
           throws IllegalIsolateStateException,
                  java.lang.SecurityException,
                  InaccessibleIsolateException

stop

public void stop()
          throws java.lang.SecurityException,
                 InaccessibleIsolateException

suspend

public void suspend()
             throws IllegalIsolateStateException,
                    java.lang.SecurityException,
                    InaccessibleIsolateException

resume

public void resume()
            throws IllegalIsolateStateException,
                   java.lang.SecurityException,
                   InaccessibleIsolateException

join

public void join()
          throws IllegalIsolateStateException,
                 InaccessibleIsolateException

join

public void join(long millis)
          throws IllegalIsolateStateException,
                 InaccessibleIsolateException

join

public void join(long millis,
                 int nanos)
          throws IllegalIsolateStateException,
                 InaccessibleIsolateException

isStarted

public boolean isStarted()
                  throws InaccessibleIsolateException

isSuspended

public boolean isSuspended()
                    throws InaccessibleIsolateException

isStopped

public boolean isStopped()
                  throws InaccessibleIsolateException

getParent

public Isolate getParent()

getChildren

public Isolate[] getChildren()

getCurrentIsolate

public static Isolate getCurrentIsolate()

equals

public boolean equals(Isolate isolate)

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object

JanosVM v1.0 API

This documentation is Copyright (C) 2000-2003 The University of Utah. All Rights Reserved. See the documentation license for distribution terms and restrictions.
Documentation, software, and mailing lists for the JanosVM can be found at the Janos Project web page: http://www.cs.utah.edu/flux/janos/
Generated on Feb 13, 2003