JanosVM v1.0 API

java.lang.isolate
Class IsolateBackEnd

java.lang.Object
  |
  +--java.lang.isolate.IsolateBackEnd
All Implemented Interfaces:
TeamEventHandler

class IsolateBackEnd
extends java.lang.Object
implements TeamEventHandler

Unique object (one per Isolate) that stores the state for that isolate (initial io bindings, context, etc.)

This object is allocated on the target Isolate's heap.

Normally this should be an "Exportable" and the Isolate class should be an "Importable". However, since the IsolateBackEnd is one-to-one with each Team, I just look up the IsolateBackEnd via Team.getClassLocal(). I just need to make sure I manipulate the IsolateBackEnd in the correct context...


Field Summary
private  java.util.prefs.TransientPreferences context
          Preferences context object
private  EventTeamHandle eventHandleKeptLive
          XXX still need this??
private  IsolateMessage[] initialMessages
          Initial messages passed in start method.
private  IsolateMessage[] ioMessages
          Initial IO messages
private  IsolateServer is
          Cached handle on our "kernel" team.
private static java.lang.Class isolateBackEndClass
           
private static java.lang.Class isolateClass
           
private  MainThread mainThread
          Handle on the main thread for this Isolate.
private  AggregateStateManager.IsolateStatusHandle statusHandle
          Handle on the aggregate-level state for this team.
 
Constructor Summary
(package private) IsolateBackEnd(java.lang.Long guid, IsolateServer is)
          For constructing the root IsolateBackEnd...
(package private) IsolateBackEnd(Team team, java.lang.Long guid, java.lang.String mainClass, java.lang.String[] mainArgs, java.util.prefs.TransientPreferences ctx, IsolateMessage stdin, IsolateMessage stdout, IsolateMessage stderr)
           
 
Method Summary
(package private) static IsolateBackEnd current()
          Get the current IsolateBackEnd.
private static java.util.prefs.TransientPreferences defaultRootContext()
           
 void event(EventTeamHandle eth, TeamReservation tr, TeamEvent ev)
          Event handler for JanosVM events.
(package private)  java.util.prefs.TransientPreferences getContext()
           
(package private)  IsolateMessage[] getIOBindings()
           
(package private)  IsolateMessage[] getIsolateMessages()
           
(package private)  IsolateServer getIsolateServer()
           
(package private)  void mainThreadRunning()
          Invoked by the main thread when it actually starts running.
private static IsolateMessage[] rootIOMessages()
           
(package private)  void setExitInfo(int status, IsolateEvent.ExitReason reason)
          Invoked by the main thread when it exits or blows up.
(package private)  void startMainThread(IsolateMessage[] initialMessages)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait, wait0
 

Field Detail

isolateBackEndClass

private static final java.lang.Class isolateBackEndClass

isolateClass

private static final java.lang.Class isolateClass

ioMessages

private final IsolateMessage[] ioMessages
Initial IO messages

initialMessages

private IsolateMessage[] initialMessages
Initial messages passed in start method.

context

private final java.util.prefs.TransientPreferences context
Preferences context object

mainThread

private MainThread mainThread
Handle on the main thread for this Isolate. Between INVALID and NEWBORN states, this thread is dormant, and just holds the initialization state. This thread is started when the Isolate moves into NEWBORN state. Then, this reference is nulled, so the thread can be collected if it exits.

eventHandleKeptLive

private final EventTeamHandle eventHandleKeptLive
XXX still need this??

is

private final IsolateServer is
Cached handle on our "kernel" team.

statusHandle

private final AggregateStateManager.IsolateStatusHandle statusHandle
Handle on the aggregate-level state for this team.
Constructor Detail

IsolateBackEnd

IsolateBackEnd(java.lang.Long guid,
               IsolateServer is)
For constructing the root IsolateBackEnd...

IsolateBackEnd

IsolateBackEnd(Team team,
               java.lang.Long guid,
               java.lang.String mainClass,
               java.lang.String[] mainArgs,
               java.util.prefs.TransientPreferences ctx,
               IsolateMessage stdin,
               IsolateMessage stdout,
               IsolateMessage stderr)
Method Detail

current

static IsolateBackEnd current()
Get the current IsolateBackEnd.

rootIOMessages

private static IsolateMessage[] rootIOMessages()
                                        throws java.io.IOException

defaultRootContext

private static final java.util.prefs.TransientPreferences defaultRootContext()

event

public void event(EventTeamHandle eth,
                  TeamReservation tr,
                  TeamEvent ev)
Event handler for JanosVM events. This is mostly to get the FINISHED event (which is sent when there are no more non-daemon threads in the team).
Specified by:
event in interface TeamEventHandler
Following copied from interface: edu.utah.janosvm.sys.TeamEventHandler
Parameters:
eth - The handle that refers to the team that triggered the event.
tr - A TeamReservation thats reserved the team that `this' is in.
ev - The TeamEvent object that describes the event that occurred.

startMainThread

void startMainThread(IsolateMessage[] initialMessages)

mainThreadRunning

void mainThreadRunning()
Invoked by the main thread when it actually starts running.

setExitInfo

void setExitInfo(int status,
                 IsolateEvent.ExitReason reason)
Invoked by the main thread when it exits or blows up.

getIsolateMessages

IsolateMessage[] getIsolateMessages()

getIOBindings

IsolateMessage[] getIOBindings()

getContext

java.util.prefs.TransientPreferences getContext()

getIsolateServer

IsolateServer getIsolateServer()

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