JanosVM v1.0 API

edu.utah.janosvm.sys
Class ExportManager

java.lang.Object
  |
  +--edu.utah.janosvm.sys.ExportManager

public final class ExportManager
extends java.lang.Object

Tracks the {@linkplain Importable importables} associated with a single {@linkplain Exportable exportable}. Each ExportManager is associated with exactly one Exportable. An exportable may have multiple managers (if it is exported under mutliple names, for example).

An ExportManager tracks the links between an exported object and its imports. This is required so that we can revoke any references when a team dies or the export is no longer available to other teams.

Author:
Tim Stack, Utah Janos Team
See Also:
Importable, Exportable

Inner Class Summary
 class ExportManager.ImportEnumerator
          The ImportEnumerator is used to traverse the list of importers of an export.
 
Method Summary
 void addImporter(Importable im)
          Add an Importable to the list of objects importing our export.
 ExportManager.ImportEnumerator getEnumerator()
           
 Exportable getExport()
          Get the object that this manager manages.
 ExportManager.ImportEnumerator imports()
          Similar to the above except that it constructs a new ImportEnumerator and adds that to the list.
 boolean imports(ExportManager.ImportEnumerator ie)
          Setup the given ImportEnumerator to traverse the importers list.
 void setExport(Exportable ex)
          If this manager is empty you can fill in its export with this function.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

setExport

public void setExport(Exportable ex)
If this manager is empty you can fill in its export with this function. Silently ignores you if this manager already has an exported object.
Parameters:
ex - The exported object to be managed.
Throws:
Throws - a NullPointerException if ex is null.

getExport

public Exportable getExport()
Get the object that this manager manages.
Returns:
The object that is being exported.

addImporter

public void addImporter(Importable im)
Add an Importable to the list of objects importing our export.
Parameters:
im - The Importable that wants a reference to our export.

getEnumerator

public ExportManager.ImportEnumerator getEnumerator()
Returns:
An ImportEnumerator for this ExportManager.

imports

public boolean imports(ExportManager.ImportEnumerator ie)
Setup the given ImportEnumerator to traverse the importers list.
Parameters:
ie - The ImportEnumerator that will be inserted into the importers list.
Returns:
True if this manager is still valid and its importers can be traversed, false otherwise.

imports

public ExportManager.ImportEnumerator imports()
Similar to the above except that it constructs a new ImportEnumerator and adds that to the list.
Returns:
A new ImportEnumerator ready to traverse the list or NULL if this manager is invalid.

toString

public java.lang.String toString()
Overrides:
toString 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