|
JanosVM v1.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.utah.janosvm.sys.PortAuthority
Manages the imports and exports of a team.
Field Summary | |
private java.util.Vector |
anonymousExports
The list of anonymous exports for a team. |
private java.util.Hashtable |
exports
The table of named exports for 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. |
ExportManager |
findExport(java.lang.Object id)
Find an export with the given identifier. |
void |
importObject(Importable to,
TeamHandle from,
java.lang.Object id)
Import a publicly available object from another team. |
(package private) static boolean |
isValid(Importable im)
|
(package private) static boolean |
register(Importable im)
Register the Importable internally so that we're revoked when the team dies. |
ExportManager |
reserveExportID(java.lang.Object id)
Attempt to reserve an exported identifier for future use. |
(package private) void |
revokeAllExports()
Revoke all of a teams exports. |
(package private) static void |
revokeAllImports()
Revoke all of a team's imports. |
void |
revokeAnonymousObject(Exportable ex)
Revoke an anonymously exported object. |
private void |
revokeAnonymousObject(Exportable ex,
ExportManager em)
|
void |
revokeObject(java.lang.Object id)
Revoke access to the export with given identifier. |
java.lang.String |
toString()
|
(package private) static void |
unregister(Importable im)
Unregister the Importable internally. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait, wait0 |
Field Detail |
private java.util.Hashtable exports
private java.util.Vector anonymousExports
Constructor Detail |
public PortAuthority()
Method Detail |
void revokeAllExports()
static boolean register(Importable im)
static void unregister(Importable im)
static boolean isValid(Importable im)
im
- The Importable to test.static void revokeAllImports()
public ExportManager reserveExportID(java.lang.Object id) throws DuplicateExportException
id
- The identifier to reserve.DuplicateExportException
- if the `id' is already used.public ExportManager exportObject(java.lang.Object id, Exportable ex) throws DuplicateExportException
id
- The identifier to export the object under.ex
- The object to export.DuplicateExportException
- if the `id' is already used.public void revokeObject(java.lang.Object id) throws NoSuchExportException
XXX rename to revokeExport()
id
- The identifier of the export to revoke.NoSuchExportException
- if there isn't an export with the given
identifier in the table.public ExportManager exportAnonymousObject(Exportable ex)
ex
- The object to export.private void revokeAnonymousObject(Exportable ex, ExportManager em)
public void revokeAnonymousObject(Exportable ex) throws NoSuchExportException
ex
- The object to revoke access to.NoSuchExportException
- if the given object isn't in the export
table.public ExportManager findExport(java.lang.Object id)
id
- The identifier associated with the ExportManager to look for.public void importObject(Importable to, TeamHandle from, java.lang.Object id) throws DeadTeamException, TeamEjectionException, NoSuchExportException
XXX what context can this be invoked in? "to" team? "from" team? If its only a certain team, perhaps it should be exposed on the specific team only?
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.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.public void cancelImport(Importable im)
im
- The Importable that should have its reference cleared.public java.lang.String toString()
toString
in class java.lang.Object
|
JanosVM v1.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |