bees.core
Class CapabilityReference
java.lang.Object
|
+--bees.core.CapabilityReference
- All Implemented Interfaces:
- java.lang.Cloneable
- public final class CapabilityReference
- extends java.lang.Object
- implements java.lang.Cloneable
A lightweight class for addressing capabilities shared by multiple domains.
It is expected that both domains have already been given the Capability
through a CapabilityEnvelope.
- See Also:
Capability
,
CapabilityEnvelope
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
CapabilityReference
public CapabilityReference(Capability cap)
- Construct a CapabilityReference referring to the given capability.
- Parameters:
cap
- The capability to enclose.
encode
public static void encode(Xdr xdr,
Capability cap)
- Encode a capability in an xdr.
- Parameters:
xdr
- The xdr that will hold the capability reference.cap
- The capability to encode.
decode
public static CapabilityReference decode(Xdr xdr)
throws InvalidCapabilityReferenceException,
java.lang.ClassNotFoundException
- Decode a capability reference.
XXX Should it just return the Capability?
- Parameters:
xdr
- The xdr that holds the capability reference.- Returns:
- A new CapabilityReference.
- Throws:
InvalidCapabilityReferenceException
- if the encoded reference is
invalid.java.lang.ClassNotFoundException
- if the capability class wasn't found.
encode
public void encode(Xdr xdr)
- Encode the reference in an xdr.
- Parameters:
xdr
- The xdr to encode the reference into.
dereference
public Capability dereference()
throws MissingCapabilityException
- Dereference this object to get the referred to capability.
- Returns:
- The referenced capability.
- Throws:
MissingCapabilityException
- if the referenced Capability is not
in this domain or has been revoked.
clone
public java.lang.Object clone()
- Overrides:
clone
in class java.lang.Object
- See Also:
Object.clone()
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
- See Also:
Object.toString()
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/