Bees v0.5.0 API

bees.core.kernel
Class KernelObjectCoroutine

java.lang.Object
  |
  +--bees.core.Coroutine
        |
        +--bees.core.ResponderCoroutine
              |
              +--bees.core.kernel.KernelObjectCoroutine

public final class KernelObjectCoroutine
extends ResponderCoroutine

Coroutine used to manage the capability material stored in the kernel.


Field Summary
static int STATE_LOADED
           
static int STATE_SUB_LOADED
           
static int STATE_WAITING
          State used when waiting for a reply.
 
Fields inherited from class bees.core.Coroutine
DEFAULT_TIMEOUT, INVALID_ID, STATE_ANY, STATE_COMPLETE, STATE_ERROR, STATE_ERROR_CAGED, STATE_ERROR_INTERNAL, STATE_ERROR_TIMEOUT, STATE_ERROR_USER, STATE_NEWBORN, STATE_USER
 
Constructor Summary
KernelObjectCoroutine()
          Construct an empty KernelObjectCoroutine.
KernelObjectCoroutine(StateResponder sr)
          Construct a KernelObjectCoroutine with the given value.
 
Method Summary
static boolean create(BDomainCoroutine sc, Capability[] caps, byte[][] data, java.lang.String comment)
          Helper function for creating a group of KernelObject's.
 void create(BDomainCoroutine sc, Capability[] cap, byte[] data, PermissionSet ps, java.lang.String comment)
           
 void create(BDomainCoroutine sc, Capability cap, byte[] data, CapabilityEnvelope[] sub, PermissionSet ps, java.lang.String comment)
           
 void create(BDomainCoroutine sc, Capability cap, byte[] data, PermissionSet ps, java.lang.String comment)
           
static Capability[] create(Capability[] cap, BDomainCoroutine sc, byte[] data, java.lang.String comment, PermissionSet ps)
           
static Capability create(Capability cap, BDomainCoroutine sc, byte[] data, CapabilityEnvelope[] sub, java.lang.String comment, PermissionSet ps)
           
static Capability create(Capability cap, BDomainCoroutine sc, byte[] data, java.lang.String comment)
          Helper function for creating and initializing a Capability.
static Capability create(Capability cap, BDomainCoroutine sc, byte[] data, java.lang.String comment, PermissionSet ps)
           
 void delete(BDomainCoroutine sc, long id)
          Delete a KernelObject.
static void delete(long id, BDomainCoroutine sc)
           
 java.lang.Object getCapability()
           
 byte[] getData()
           
 long getStoreID()
           
 CapabilityEnvelope[] getSubcapabilities()
           
 void handle(BeesEvent ae)
          Callback used to handle BeesEvents directed to this Coroutine.
 void instantiate(PermissionSet ps)
           
 void lookup(BDomainCoroutine sc, Capability[] cap, long storeID)
           
 void lookup(BDomainCoroutine sc, Capability cap, long storeID)
           
 java.lang.String toString()
           
 
Methods inherited from class bees.core.ResponderCoroutine
getResponder, setState
 
Methods inherited from class bees.core.Coroutine
cleanup, drop, finalize, getCoroutine, getID, getState, getThrowable, setThrowable, waitForCompletion, waitForCompletion, waitForState, waitForState
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

STATE_WAITING

public static final int STATE_WAITING
State used when waiting for a reply.

STATE_LOADED

public static final int STATE_LOADED

STATE_SUB_LOADED

public static final int STATE_SUB_LOADED
Constructor Detail

KernelObjectCoroutine

public KernelObjectCoroutine(StateResponder sr)
Construct a KernelObjectCoroutine with the given value.
Parameters:
sr - A StateResponder that should be called when the Coroutine's state changes.

KernelObjectCoroutine

public KernelObjectCoroutine()
Construct an empty KernelObjectCoroutine.
Method Detail

create

public static boolean create(BDomainCoroutine sc,
                             Capability[] caps,
                             byte[][] data,
                             java.lang.String comment)
Helper function for creating a group of KernelObject's.
Parameters:
sc - The current domain's coroutine.
data - An array of capability material to create in the kernel.
comment - The comment to attach to all the KernelObject's.

create

public static Capability create(Capability cap,
                                BDomainCoroutine sc,
                                byte[] data,
                                CapabilityEnvelope[] sub,
                                java.lang.String comment,
                                PermissionSet ps)

create

public static Capability create(Capability cap,
                                BDomainCoroutine sc,
                                byte[] data,
                                java.lang.String comment,
                                PermissionSet ps)

create

public static Capability[] create(Capability[] cap,
                                  BDomainCoroutine sc,
                                  byte[] data,
                                  java.lang.String comment,
                                  PermissionSet ps)

create

public static Capability create(Capability cap,
                                BDomainCoroutine sc,
                                byte[] data,
                                java.lang.String comment)
Helper function for creating and initializing a Capability.
Parameters:
cap - The Capability to initialize.
sc - The current domain's coroutine.
data - The capability material.
comment - The comment to attach to the KernelObject.

delete

public static void delete(long id,
                          BDomainCoroutine sc)

getData

public byte[] getData()
Returns:
The capability material.

getSubcapabilities

public CapabilityEnvelope[] getSubcapabilities()

getStoreID

public long getStoreID()
Returns:
The KernelObject's unique identifier.

getCapability

public java.lang.Object getCapability()

instantiate

public void instantiate(PermissionSet ps)

create

public void create(BDomainCoroutine sc,
                   Capability cap,
                   byte[] data,
                   PermissionSet ps,
                   java.lang.String comment)

create

public void create(BDomainCoroutine sc,
                   Capability cap,
                   byte[] data,
                   CapabilityEnvelope[] sub,
                   PermissionSet ps,
                   java.lang.String comment)

create

public void create(BDomainCoroutine sc,
                   Capability[] cap,
                   byte[] data,
                   PermissionSet ps,
                   java.lang.String comment)

lookup

public void lookup(BDomainCoroutine sc,
                   Capability cap,
                   long storeID)

lookup

public void lookup(BDomainCoroutine sc,
                   Capability[] cap,
                   long storeID)

delete

public void delete(BDomainCoroutine sc,
                   long id)
Delete a KernelObject.
Parameters:
sc - The current domain's coroutine.
id - The KernelObject's unique identifier.

handle

public void handle(BeesEvent ae)
Description copied from class: Coroutine
Callback used to handle BeesEvents directed to this Coroutine.
Overrides:
handle in class Coroutine
Following copied from class: bees.core.Coroutine
Parameters:
ae - The BeesEvent to handle.

toString

public java.lang.String toString()
Overrides:
toString in class ResponderCoroutine
Following copied from class: bees.core.ResponderCoroutine
See Also:
Object.toString()

Bees v0.5.0 API

This documentation is Copyright (C) 2002 The University of Utah. All Rights Reserved. See the individual source files for distribution terms.
Documentation, software, and mailing lists for Bees v0.5.0 can be found at the Janos Project: http://www.cs.utah.edu/flux/janos/