edu.mit.csail.aeolus.api
Class PID

java.lang.Object
  extended by edu.mit.csail.aeolus.api.PID
All Implemented Interfaces:
AeolusSafe, java.io.Serializable, java.lang.Cloneable

public final class PID
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable, AeolusSafe

Objects of this class represent principals.

See Also:
Serialized Form

Constructor Summary
PID()
          Creates a new principal.
 
Method Summary
 void actFor(PID p)
          Adds an act-for link from this to principal p.
 PID clone()
          Returns a new PID which will be equal to this.
 boolean doesActFor(PID p)
          Returns true if and only if p acts for this
 boolean equals(PID p)
          Returns true if the PID p equals this, otherwise returns false
static PID getPublicPID()
          Returns the public PID
 void revoke(PID p)
          Removes the act-for link from this to principal p.
 java.lang.String toString()
          Returns a string representation of this.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PID

public PID()
    throws AuthorityException,
           InfoFlowControlException,
           AeolusException
Creates a new principal. Caller principal will act for the new principal.

Throws:
AuthorityException - - if caller principal not authorized to create a new principal (i.e. if the caller is the public principal)
AeolusException - - if failure in communicating with the authority server or an unexpected platform failure occurred
InfoFlowControlException - - if caller's secrecy label is not null
Method Detail

actFor

public void actFor(PID p)
            throws InfoFlowControlException,
                   AuthorityException,
                   AeolusException
Adds an act-for link from this to principal p. Caller's principal must act for this and p must not be the public pid.

Throws:
AuthorityException - - if caller principal does not act for this or if p is the public pid
AeolusException - - if failure in communicating with the authority server or an unexpected platform failure occurred or would create a cycle in the principal hierarchy
InfoFlowControlException - - if caller's secrecy label is not null

clone

public PID clone()
Returns a new PID which will be equal to this.

Overrides:
clone in class java.lang.Object

doesActFor

public boolean doesActFor(PID p)
Returns true if and only if p acts for this


equals

public boolean equals(PID p)
Returns true if the PID p equals this, otherwise returns false


getPublicPID

public static PID getPublicPID()
Returns the public PID


revoke

public void revoke(PID p)
            throws AuthorityException,
                   AeolusException,
                   InfoFlowControlException
Removes the act-for link from this to principal p. Current principal must act for principal p.

Throws:
AuthorityException - - if caller principal doesn't act-for this or there is no link from this to p
AeolusException - - if failure in communicating with the authority server or an unexpected platform failure occurred
InfoFlowControlException - - if caller's secrecy label is not null

toString

public java.lang.String toString()
Returns a string representation of this.

Overrides:
toString in class java.lang.Object