Google

JanosVM v0.6.0 Java API Documentation: Class ExportManager
JanosVM v0.6.0 Java 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 importables associated with a single exportable. Each ExportManager is associated with exactly one Exportable. An exportable may have multiple ExportManagers (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()
           
 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.
Parameters:
ex - The exported object to be managed.
Throws:
Throws - a NullPointerException if ex is null.

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 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