apps.authenticator
Class AuthenticatorUnknownProtocolPresentation
java.lang.Object
|
+--bees.core.ProtocolPresentation
|
+--bees.core.ExtendedProtocolPresentation
|
+--bees.core.UnknownProtocolPresentation
|
+--apps.authenticator.AuthenticatorUnknownProtocolPresentation
- All Implemented Interfaces:
- ExternalCapsuleReceiver, ExternalChannel
- public abstract class AuthenticatorUnknownProtocolPresentation
- extends UnknownProtocolPresentation
An AuthenticatorUnknownProtocolPresentation is a base class for
authenticating unknown protocol flows.
Methods inherited from class bees.core.ExtendedProtocolPresentation |
addNeighbor, addNeighborReply, allocateMessageID, drop, getState, lookupMessage, receive, register, registerReply, releaseMessageID, remNeighbor, remNeighborReply, sendCapsule, setState, unregister, unregisterReply, waitForState |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
AuthenticatorUnknownProtocolPresentation
public AuthenticatorUnknownProtocolPresentation(Authenticator auth)
- Construct an AuthenticatorUnknownProtocolPresentation with the given
values.
- Parameters:
auth
- The Authenticator this presentation is being used by.
getAuthenticator
public Authenticator getAuthenticator()
- Returns:
- The Authenticator this presentation is being used by.
computePrefix
protected java.lang.String computePrefix(TypeID fp,
PairChain pc)
- Compute the Logger prefix for the new protocol flow.
- Parameters:
fp
- A finger print of the protocol flow.pc
- The PairChain describing the protocol flow.- Returns:
- The Logger prefix for the given protocol flow.
createLogger
protected CapabilityEnvelope createLogger(TypeID fp,
PairChain pc)
- Create the Logger object for the new protocol flow.
- Parameters:
fp
- A finger print of the protocol flow.pc
- The PairChain describing the protocol flow.- Returns:
- A CapabilityEnvelope wrapping the new Logger.
computeCapabilities
protected CapabilityTree computeCapabilities(TypeID fp,
PairChain pc)
- Parameters:
fp
- A finger print of the protocol flow.pc
- The PairChain describing the protocol flow.- Returns:
- A CapabilityTree containing all the capabilities to be passed
to the new protocol flow.
findCapabilities
protected Capability[] findCapabilities(java.lang.String prefix,
Pair pair)
- Find a group of capabilities based on a set of tags in a PairChain.
- Parameters:
prefix
- The prefix to use when computing the names of the
within the Authenticator's name space.pair
- The pair containing the PairChain of capability names.- Returns:
- An array of capabilities that correspond to those requested by
the PairChain.
mungeCapability
protected void mungeCapability(java.util.Vector caps,
java.lang.String prefix,
Pair pair)
- Wrap a Capability described by the given Pair in an envelope for
delivery to the new protocol flow.
- Parameters:
caps
- The Vector of capabilities that will be passed to the new flow.prefix
- The prefix to prepend to "pair.getTag()" when looking up
the value.pair
- A Pair whose tag names a Capability and value is a PairChain
optionally containing, "name", the name to use in the destination flow,
"revoke", the PermissionSet to revoke from the capability, and "bound",
the PermissionSet to bound the capability by.
mungeCapabilities
protected CapabilityTree mungeCapabilities(java.lang.String prefix,
Pair pair)
- Wrap a set of capabilities described by the given Pair.
- Parameters:
prefix
- The prefix to prepend to "pair.getTag()" when looking up
the value.pair
- A Pair whose value contains a PairChain whose elements can
be passed to mungeCapability.- Returns:
- An initialized CapabilityTree containing the capabilities
described by the given Pair.
validate
protected abstract boolean validate(PairChain pc)
throws java.lang.Throwable
- Callback used to validate a protocol flow description.
- Parameters:
pc
- The protocol flow description.- Returns:
- True if the description is valid and should be accepted for
installation on this node.
- Throws:
java.lang.Throwable
- If anything goes wrong.
computeAuthority
protected abstract CapabilityTree computeAuthority(PairChain pc)
- Parameters:
pc
- The protocol flow description.- Returns:
- An initialized CapabilityTree containing any extra capabilities
that should be passed to the flow.
computeInitialCapabilities
protected abstract Capability[] computeInitialCapabilities(PairChain pc)
- Call back used to compute the set of initial capabilities for a new
BDomain. Usually, this is just a set of resource meters.
- Parameters:
pc
- The flow description PairChain.- Returns:
- An array of capabilities to be used when creating the new
BDomain.
computeResources
protected abstract PermissionSet computeResources(PairChain pc)
- Call back used to compute the resource bounds for a new BDomain.
- Parameters:
pc
- The flow description PairChain.- Returns:
- A PermissionSet containing the resource bounds.
newProtocol
public void newProtocol(CapabilityReference neighbor,
byte[] flowDesc)
- Overrides:
newProtocol
in class UnknownProtocolPresentation
- See Also:
UnknownProtocolPresentation.newProtocol(CapabilityReference, byte[])
toString
public java.lang.String toString()
- Overrides:
toString
in class UnknownProtocolPresentation
- 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/