Contents | Package | Class | Tree | Deprecated | Index | Help
PREV | NEXT SHOW LISTS | HIDE LISTS

Class cornell.slk.jkernel.core.Capability

Source code
java.lang.Object
    |
    +----cornell.slk.jkernel.core.Capability
Subclasses:
SharedClass

public abstract class Capability
extends java.lang.Object
A J-Kernel capability is an object which may be shared with other tasks. Cross-task communication in the J-Kernel is done by making method invocations on capabilities.


Field Summary
int  id
 
InternalPass  ip
 
Task  restriction
 
Task  targetTask
 
 

Constructor Summary
 Capability(Task targetTask, Task restriction, InternalPass ip)
 
 

Method Summary
static Capability  create(Remote obj)
Create a new capability, which may be passed to and used by other tasks.
static Capability  create(Remote obj, Task restriction)
 
static Capability  create(Task targetTask, Remote obj, Task restriction)
 
void  finalize()
 
ThreadTaskState  getThreadTaskState()
 
FastCopyContext  newFastCopyContext(ThreadTaskState tds, Task fromTask, Task toTask)
 
void  nullify(InternalPass ip)
 
void  readObject(java.io.ObjectInputStream in)
 
void  releaseFastCopyContext(ThreadTaskState tds, FastCopyContext fcc)
 
void  revoke()
Revoke the capability.
void  revoke(Task currentTask)
 
void  revokeInternal()
 
void  writeObject(java.io.ObjectOutputStream out)
 
 
Methods inherited from class java.lang.Object
 , clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

targetTask

protected Task targetTask
The task that generated the capability.

restriction

protected Task restriction
Not used for anything yet.

ip

protected InternalPass ip

id

int id
Constructor Detail

Capability

protected Capability(Task targetTask,
                     Task restriction,
                     InternalPass ip)
Method Detail

getThreadTaskState

protected final ThreadTaskState getThreadTaskState()

newFastCopyContext

protected final FastCopyContext newFastCopyContext(ThreadTaskState tds,
                                                   Task fromTask,
                                                   Task toTask)

releaseFastCopyContext

protected final void releaseFastCopyContext(ThreadTaskState tds,
                                            FastCopyContext fcc)

nullify

protected abstract void nullify(InternalPass ip)

revoke

public final void revoke() throws java.lang.SecurityException
Revoke the capability. The capability immediately becomes invalid, and no more invocations can be made through it. All attempted invocations on a revoked capability will cause a NullPointerException.

Only the task that created the capability can revoke the capability. If any other task attemps to revoke the capability, a SecurityException is thrown.

revoke

final void revoke(Task currentTask)

revokeInternal

final void revokeInternal()

create

public static Capability create(Remote obj)
Create a new capability, which may be passed to and used by other tasks. The object returned by this method is a subclass of the class Capability, and it implements all of the remote classes that obj implements.

create

static Capability create(Remote obj,
                         Task restriction)

create

static Capability create(Task targetTask,
                         Remote obj,
                         Task restriction)

writeObject

private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException

readObject

private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException

finalize

protected final void finalize() throws java.lang.Throwable
Overrides:
finalize in class java.lang.Object

Contents | Package | Class | Tree | Deprecated | Index | Help
PREV | NEXT SHOW LISTS | HIDE LISTS