JanosVM v0.6.0 Java API

edu.utah.janosvm.sys
Class Team

java.lang.Object
  |
  +--edu.utah.janosvm.sys.ListNode
        |
        +--edu.utah.janosvm.sys.Importable
              |
              +--edu.utah.janosvm.sys.TeamHandle
                    |
                    +--edu.utah.janosvm.sys.Team

public final class Team
extends TeamHandle

Peer object for a TeamBackEnd. An instance of a Team is created inside each team to contain that team's local data. Specifically, this class keeps track of the cross-team references coming from its team. Team objects are never created directly, they are created implicitly as part of 'Team.create()'.

The association with the TeamBackEnd in the kernel team is implicit (through TeamBackEnd.getCurrentTeam()).

Because this class extends TeamHandle, it is importable.

Author:
Tim Stack, Utah Janos Team
See Also:
TeamBackEnd, TeamHandle

Field Summary
private  java.lang.String description
          A description of the contents of the team.
private  TeamHandle kernel
          The cached kernel team handle.
private  java.util.Vector localData
          The vector of data that is local to this team.
private  PortAuthority pa
          The manager of any cross team references.
 
Fields inherited from class edu.utah.janosvm.sys.TeamHandle
be
 
Fields inherited from class edu.utah.janosvm.sys.Importable
em
 
Fields inherited from class edu.utah.janosvm.sys.ListNode
pred, succ
 
Constructor Summary
(package private) Team()
           
(package private) Team(ExportManager kernelManager)
          Construct a Team object.
 
Method Summary
 boolean addDependency(TeamHandle th)
          Add a dependency to this team.
static TeamHandle create()
           
static TeamHandle create(ResourceSpec[] specs)
           
static TeamHandle create(java.lang.String name)
           
static TeamHandle create(java.lang.String name, ResourceSpec[] specs)
           
private static TeamHandle create(java.lang.String name, ResourceSpec[] specs, kaffe.util.Ptr nativeSpecs)
           
static Team current()
           
 ExportManager exportAnonymousObject(Exportable ex)
           
 ExportManager exportObject(java.lang.Object id, Exportable ex)
           
static TeamHandle find(java.lang.String name)
          Get a handle on the Team with the given name.
 java.lang.Object getClassLocal(java.lang.Class cl)
           
static java.lang.Object getCurrentClassLocal(java.lang.Class cl)
           
 java.util.Vector getData()
           
 java.lang.String getDescription()
          Get the Team's description string.
 TeamHandle getKernelTeam()
          Get a handle on the kernel team.
 PortAuthority getPortAuthority()
          Get the ExportTable for the current team.
 void notifyOnFinish()
          Set the flag on the team object that indicates that the last non-daemon thread in the team should send out a TeamEvent.FINISHED event.
 ExportManager reserveExportID(java.lang.Object id)
           
 void revokeAnonymousObject(Exportable ex)
           
 void revokeObject(java.lang.Object id)
          XXX rename to revokeExport
 void setClassLocal(java.lang.Class cl, java.lang.Object obj)
          Store a per-team class local object.
static void setCurrentClassLocal(java.lang.Class cl, java.lang.Object obj)
           
 void setDescription(java.lang.String str)
           
(package private)  void setKernelHandle(ExportManager kernelManager)
           
 java.lang.String toString()
           
 
Methods inherited from class edu.utah.janosvm.sys.TeamHandle
bindTo, cancelImport, clone, equals, getID, getName, importObject, isTerminated, owns, popReservation, pushReservation, returnFrom, switchTo, terminate, unbindFrom
 
Methods inherited from class edu.utah.janosvm.sys.Importable
copy, finalize, getExportManager, revoke, setExportManager
 
Methods inherited from class edu.utah.janosvm.sys.ListNode
append, prepend, remove
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait, wait0
 

Field Detail

pa

private final PortAuthority pa
The manager of any cross team references.

localData

private final java.util.Vector localData
The vector of data that is local to this team. This vector is not used by the JanosVM. The protocol for using this vector is up to the system hosted by the JanosVM.

kernel

private final TeamHandle kernel
The cached kernel team handle.

description

private java.lang.String description
A description of the contents of the team.
Constructor Detail

Team

Team()

Team

Team(ExportManager kernelManager)
Construct a Team object.

NOTE: For kernel use only; there is only one of these objects per team.

Method Detail

create

private static TeamHandle create(java.lang.String name,
                                 ResourceSpec[] specs,
                                 kaffe.util.Ptr nativeSpecs)
                          throws DuplicateExportException,
                                 ResourceSpecException,
                                 DeadTeamException

create

public static TeamHandle create(java.lang.String name,
                                ResourceSpec[] specs)
                         throws DuplicateExportException,
                                ResourceSpecException,
                                DeadTeamException

create

public static TeamHandle create(java.lang.String name)
                         throws DuplicateExportException,
                                ResourceSpecException,
                                DeadTeamException

create

public static TeamHandle create(ResourceSpec[] specs)
                         throws ResourceSpecException,
                                DeadTeamException

create

public static TeamHandle create()
                         throws ResourceSpecException,
                                DeadTeamException

current

public static Team current()
Returns:
The Team object for the current team.

find

public static TeamHandle find(java.lang.String name)
                       throws DeadTeamException,
                              TeamEjectionException,
                              NoSuchExportException
Get a handle on the Team with the given name. TeamHandles with the null name cannot be found this way.
Parameters:
name - The name of the TeamHandle to locate.
Returns:
A TeamHandle object that imports the TeamBackEnd with the given name.

setKernelHandle

void setKernelHandle(ExportManager kernelManager)

setDescription

public void setDescription(java.lang.String str)
Parameters:
str - A string that describes this team.

getDescription

public java.lang.String getDescription()
Description copied from class: TeamHandle
Get the Team's description string.
Overrides:
getDescription in class TeamHandle
Returns:
A string that describes this team.

getKernelTeam

public TeamHandle getKernelTeam()
Get a handle on the kernel team.
Returns:
The cached kernel Team handle.

getPortAuthority

public PortAuthority getPortAuthority()
Get the ExportTable for the current team.
Returns:
The ExportTable for the current team.

reserveExportID

public ExportManager reserveExportID(java.lang.Object id)
                              throws DuplicateExportException

exportObject

public ExportManager exportObject(java.lang.Object id,
                                  Exportable ex)
                           throws DuplicateExportException

revokeObject

public void revokeObject(java.lang.Object id)
                  throws NoSuchExportException
XXX rename to revokeExport

exportAnonymousObject

public ExportManager exportAnonymousObject(Exportable ex)

revokeAnonymousObject

public void revokeAnonymousObject(Exportable ex)
                           throws NoSuchExportException

getData

public java.util.Vector getData()
Returns:
The local data vector for the current team.

setClassLocal

public void setClassLocal(java.lang.Class cl,
                          java.lang.Object obj)
Store a per-team class local object.
Parameters:
cl - The class the object should be stored with.
obj - The object to store with the class.

setCurrentClassLocal

public static void setCurrentClassLocal(java.lang.Class cl,
                                        java.lang.Object obj)

getClassLocal

public java.lang.Object getClassLocal(java.lang.Class cl)
Parameters:
cl - The class to retrieve the local object for.
Returns:
The Object associated with the class or null.

getCurrentClassLocal

public static java.lang.Object getCurrentClassLocal(java.lang.Class cl)

addDependency

public boolean addDependency(TeamHandle th)
Add a dependency to this team.
Parameters:
th - The team this one should depend on.
Returns:
True if the addition succeeded, false otherwise.

notifyOnFinish

public void notifyOnFinish()
Set the flag on the team object that indicates that the last non-daemon thread in the team should send out a TeamEvent.FINISHED event.

toString

public java.lang.String toString()
Overrides:
toString in class TeamHandle

JanosVM v0.6.0 Java API

This documentation is Copyright (C) 2000-2002 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 Mar 17, 2002