|
Bees v0.5.0 API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--bees.core.Capability
|
+--bees.core.NodeSpec
|
+--bees.core.Node
The Node class provides access to node global functionality.
| Field Summary | |
static PermissionSet |
DEFAULT_PERMISSIONS
The default permissions for a new Node object. |
static Permission |
JSI_REGISTER
Permission to register a JSI handler. |
static Permission |
PROTOCOL_REGISTER
Permission for registering a protocol. |
static Permission |
READ_NODE_NAME
Permission for reading the node name. |
static Permission |
READ_NODE_VERSION
Permission for reading the node version info. |
static Permission |
THREAD_START
Permission for starting a thread. |
| Fields inherited from class bees.core.Capability |
DELETE_PERMISSION, id, INVALID_ID |
| Constructor Summary | |
Node()
Construct an empty Node object. |
|
| Method Summary | |
void |
arraycopy(java.lang.Object src,
int src_position,
java.lang.Object dst,
int dst_position,
int length)
|
void |
beginManagement(ProtocolSession ps)
Send a request to the Auth Application asking for it to manage the given protocol. |
IntegerPermission |
collected(Node node,
ProtocolSession ps)
This is called when this element is up for collection, the return value specifies the new expiration time. |
protected void |
fromBytes(byte[] flattened,
CapabilityEnvelope[] ce)
Bind this capability to the given object. |
Authorizer |
getAuthorizer()
|
Capability |
getCapability(java.lang.String name)
Get a user capability from the capability tree. |
ObjectMap |
getCapabilityMap(java.lang.String name)
Get a user subtree from the capability tree. |
IntegerPermission |
getInactivityTimeout()
|
java.lang.String |
getName()
|
void |
getSuites(edu.utah.janosvm.kit.comm.jsi.JSIMessage jm)
|
java.lang.String |
getVersion()
|
void |
handleMessage(edu.utah.janosvm.kit.comm.jsi.JSIHandlerContext jhc,
edu.utah.janosvm.kit.comm.jsi.JSIMessage jm)
|
boolean |
isOnFire()
|
boolean |
pass(ProtocolPresentation pp,
CapabilityTree ct)
|
DLProtocolPresentation |
register(DLProtocolPresentation retval,
NeighborImpl ni,
PairChain flowDesc,
Capability[] initialCaps,
PermissionSet transfer,
CapabilityTree ct)
Create a new domain and load the protocol from a neighbor. |
DLProtocolPresentation |
register(NeighborImpl ni,
PairChain flowDesc,
Capability[] initialCaps,
PermissionSet transfer,
CapabilityTree ct)
Create a new domain and load the protocol from a neighbor. |
void |
register(ProtocolPresentation pp,
CapabilityEnvelope ce,
TypeID sessionID)
Connect the given presentation to a protocol session in another domain. |
void |
register(ProtocolPresentation pp,
ProtocolFlow pf,
Capability[] initialCaps,
PermissionSet ps,
CapabilityTree ct)
Create a new domain and load a protocol from the local disk. |
void |
removed(Node node,
ProtocolSession ps)
This is called when the element is manually removed from from the cache. |
CapabilityEnvelope[] |
requestCapability(java.lang.String src,
java.lang.String dst,
byte[] auth)
Request a capability from the Auth Application. |
edu.utah.janosvm.kit.comm.jsi.JSIHandler |
resolveSpecifier(edu.utah.janosvm.kit.comm.jsi.JSIMessage jm,
edu.utah.janosvm.kit.comm.jsi.JSIPair jp)
|
void |
revoke()
Revoke access to the capability. |
void |
setAuthorizer(Authorizer authorizer)
|
void |
setInactivityTimeout(IntegerPermission ip)
|
void |
setJSIHandler(java.lang.String name,
edu.utah.janosvm.kit.comm.jsi.JSIHandler jh)
Set the JSIHandler for a given subproperty. |
void |
shutdown()
Shutdown the BDomain containing this node. |
void |
sleep(long millis)
Put the current thread to sleep for the given number of milliseconds. |
void |
threadStart(java.lang.Runnable r)
Create and start a new thread with a default name. |
void |
threadStart(java.lang.Runnable r,
java.lang.String threadName)
Create and start a new thread. |
java.lang.String |
toShortString()
|
java.lang.String |
toString()
|
| Methods inherited from class bees.core.NodeSpec |
getFactory, specFromBytes, toBytes |
| Methods inherited from class bees.core.Capability |
checkPermission, clear, clonePermission, deleteCapability, equals, fromBytes, revokedPermission, revokePermission, revokePermissions, valid |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final Permission READ_NODE_NAME
public static final Permission READ_NODE_VERSION
public static final Permission THREAD_START
public static final Permission PROTOCOL_REGISTER
public static final Permission JSI_REGISTER
public static final PermissionSet DEFAULT_PERMISSIONS
| Constructor Detail |
public Node()
| Method Detail |
protected void fromBytes(byte[] flattened,
CapabilityEnvelope[] ce)
throws java.lang.Exception
CapabilityfromBytes in class CapabilityCapability.fromBytes(byte[], CapabilityEnvelope[])public void revoke()
Capabilityrevoke in class CapabilityCapability.revoke()public Authorizer getAuthorizer()
public void setAuthorizer(Authorizer authorizer)
authorizer - This node's "authorizer" handler.
public ObjectMap getCapabilityMap(java.lang.String name)
throws java.util.NoSuchElementException
name - The name of the subtree.java.util.NoSuchElementException - if the subtree couldn't be found.
public Capability getCapability(java.lang.String name)
throws java.util.NoSuchElementException
name - The name of the capability.java.util.NoSuchElementException - if the capability couldn't be found.public java.lang.String getName()
getName in class NodeSpecpublic java.lang.String getVersion()
getVersion in class NodeSpecpublic void setInactivityTimeout(IntegerPermission ip)
ip - Permission that indicates the number of milliseconds this node
should live for without any activity.public IntegerPermission getInactivityTimeout()
public final void removed(Node node,
ProtocolSession ps)
NodeCache.EventHandlerremoved in interface NodeCache.EventHandlerNodeCache.EventHandler.removed(Node, ProtocolSession)
public final IntegerPermission collected(Node node,
ProtocolSession ps)
NodeCache.EventHandlercollected in interface NodeCache.EventHandlerNodeCache.EventHandler.collected(Node, ProtocolSession)
public void beginManagement(ProtocolSession ps)
throws java.util.NoSuchElementException
ps - The ProtocolSession to be managed.java.util.NoSuchElementException - If the "authenticator" capability could
not be found.
public CapabilityEnvelope[] requestCapability(java.lang.String src,
java.lang.String dst,
byte[] auth)
throws java.lang.IllegalStateException
src - The name of the capability in the Auth Applications name
space.dst - The name of the capability in this domain's name space.auth - The Auth data required to gain access to the requested
capabilities.java.lang.IllegalStateException - If beginManagement was not called before
requesting the capability.
public boolean pass(ProtocolPresentation pp,
CapabilityTree ct)
public void register(ProtocolPresentation pp,
ProtocolFlow pf,
Capability[] initialCaps,
PermissionSet ps,
CapabilityTree ct)
throws BDomainCreationException,
java.lang.ClassNotFoundException,
java.lang.InstantiationException,
java.lang.IllegalAccessException,
java.lang.Throwable
pp - The ProtocolPresentation to connect to the protocol in the
new domain.pf - The description of the flow.initialCaps - The resource capabilities required to get the domain
going.ps - The resource limits for the new domain.ct - The capabilities to pass to the new domain.
public DLProtocolPresentation register(DLProtocolPresentation retval,
NeighborImpl ni,
PairChain flowDesc,
Capability[] initialCaps,
PermissionSet transfer,
CapabilityTree ct)
throws BDomainCreationException,
java.lang.Throwable
retval - The DLProtocolPresentation to connect to the DLProtocol
in the new domain or null if one should be created.ni - The neighbor to download the flow from.flowDesc - The flow tuple.initialCaps - The resource capabilities required to get the domain
going.transfer - The resource limits for the new domain.ct - The capabilities to pass to the new domain.
public DLProtocolPresentation register(NeighborImpl ni,
PairChain flowDesc,
Capability[] initialCaps,
PermissionSet transfer,
CapabilityTree ct)
throws BDomainCreationException,
java.lang.Throwable
ni - The neighbor to download the flow from.flowDesc - The flow tuple.initialCaps - The resource capabilities required to get the domain
going.transfer - The resource limits for the new domain.ct - The capabilities to pass to the new domain.
public void register(ProtocolPresentation pp,
CapabilityEnvelope ce,
TypeID sessionID)
throws MissingCapabilityException,
java.lang.InstantiationException
pp - The ProtocolPresentation to connect.ce - An envelope containing an EventChannel capability.sessionID - The protocol session identifier to connect to in the
domain.
public void threadStart(java.lang.Runnable r,
java.lang.String threadName)
throws PermissionException
r - The Runnable to begin executing in a new thread.threadName - The name of the newly created thread.PermissionException - If this node does not have the THREAD_START
permission.
public void threadStart(java.lang.Runnable r)
throws PermissionException
r - The Runnable to begin executing in a new thread.PermissionException - If this node does not have the THREAD_START
permission.
public void setJSIHandler(java.lang.String name,
edu.utah.janosvm.kit.comm.jsi.JSIHandler jh)
throws PermissionException
name - The property name that should resolve to the given
JSIHandler.jh - The JSIHandler that implements a property.PermissionException - If this node does not have the JSI_REGISTER
property.public void shutdown()
public void sleep(long millis)
throws java.lang.InterruptedException
millis - The number of milliseconds to sleep.java.lang.InterruptedException - If another thread uses interrupt() on the
current thread.
public void arraycopy(java.lang.Object src,
int src_position,
java.lang.Object dst,
int dst_position,
int length)
java.lang.System#arraycopy(Object, int, Object, int, int)public boolean isOnFire()
public edu.utah.janosvm.kit.comm.jsi.JSIHandler resolveSpecifier(edu.utah.janosvm.kit.comm.jsi.JSIMessage jm,
edu.utah.janosvm.kit.comm.jsi.JSIPair jp)
resolveSpecifier in interface edu.utah.janosvm.kit.comm.jsi.JSIHandlerJSIHandler.resolveSpecifier(JSIMessage, JSIPair)
public void handleMessage(edu.utah.janosvm.kit.comm.jsi.JSIHandlerContext jhc,
edu.utah.janosvm.kit.comm.jsi.JSIMessage jm)
handleMessage in interface edu.utah.janosvm.kit.comm.jsi.JSIHandlerJSIHandler.handleMessage(JSIHandlerContext, JSIMessage)public void getSuites(edu.utah.janosvm.kit.comm.jsi.JSIMessage jm)
getSuites in interface edu.utah.janosvm.kit.comm.jsi.JSIHandlerJSIHandler.getSuites(JSIMessage)public java.lang.String toShortString()
public java.lang.String toString()
toString in class NodeSpecbees.core.CapabilityObject.toString()
|
Bees v0.5.0 API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||