JanosVM v0.6.0 Java API Documentation: Class PortAuthority
JanosVM v0.6.0 Java API

edu.utah.janosvm.sys
Class PortAuthority

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

public final class PortAuthority
extends java.lang.Object

Manages the imports and exports of a team.


Constructor Summary
PortAuthority()
           
 
Method Summary
 void cancelImport(Importable im)
          Break the reference of the given Importable.
 ExportManager exportAnonymousObject(Exportable ex)
          Export an object without a public identifier.
 ExportManager exportObject(java.lang.Object id, Exportable ex)
          Export an object with the given identifier.
 void importObject(Importable to, TeamHandle from, java.lang.Object id)
          Import a publicly available object from another team.
 ExportManager reserveExportID(java.lang.Object id)
          Attempt to reserve an exported identifier for future use.
 void revokeAnonymousObject(Exportable ex)
          Revoke an anonymously exported object.
 void revokeObject(java.lang.Object id)
          Revoke access to the export with given identifier.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PortAuthority

public PortAuthority()
Method Detail

reserveExportID

public ExportManager reserveExportID(java.lang.Object id)
                              throws DuplicateExportException
Attempt to reserve an exported identifier for future use. This is useful if you want to delay the construction of the Exportable object until you're sure that the identifier is available.
Parameters:
id - The identifier to reserve.
Returns:
An empty ExportManager that should eventually be filled in with the export.
Throws:
DuplicateExportException - if the `id' is already used.

exportObject

public ExportManager exportObject(java.lang.Object id,
                                  Exportable ex)
                           throws DuplicateExportException
Export an object with the given identifier.
Parameters:
id - The identifier to export the object under.
ex - The object to export.
Returns:
The ExportManager for this mapping of `id' to `ex'.
Throws:
DuplicateExportException - if the `id' is already used.

revokeObject

public void revokeObject(java.lang.Object id)
                  throws NoSuchExportException
Revoke access to the export with given identifier.

XXX rename to revokeExport()

Parameters:
id - The identifier of the export to revoke.
Throws:
NoSuchExportException - if there isn't an export with the given identifier in the table.

exportAnonymousObject

public ExportManager exportAnonymousObject(Exportable ex)
Export an object without a public identifier.
Parameters:
ex - The object to export.
Returns:
The ExportManager for the newly exported object.

revokeAnonymousObject

public void revokeAnonymousObject(Exportable ex)
                           throws NoSuchExportException
Revoke an anonymously exported object.
Parameters:
ex - The object to revoke access to.
Throws:
NoSuchExportException - if the given object isn't in the export table.

importObject

public void importObject(Importable to,
                         TeamHandle from,
                         java.lang.Object id)
                  throws DeadTeamException,
                         TeamEjectionException,
                         NoSuchExportException
Import a publicly available object from another team.
Parameters:
to - The Importable that should be set to reference the export.
from - Reference to the team to import the object from.
id - The identifier of the object to import from the given team.
Throws:
DeadTeamException - if the team couldn't be reached.
TeamEjectionException - if the thread was thrown out of the team during processing.
NoSuchExportException - if the object doesn't exist in the other team.

cancelImport

public void cancelImport(Importable im)
Break the reference of the given Importable.
Parameters:
im - The Importable that should have its reference cleared.

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