edu.nyu.cs.pdsg.drbac
Class DelegationWrapper

java.lang.Object
  extended byedu.nyu.cs.pdsg.drbac.DelegationWrapper
All Implemented Interfaces:
ProofChangedListener

public class DelegationWrapper
extends java.lang.Object
implements ProofChangedListener

Maintains a subscription to this delegation's home in order to track its validity. Also responsible for notifying all subscribed ProofMonitors and RemDelegMonitors


Field Summary
protected  Delegation deleg
           
protected  boolean status
           
protected  HomeSubscription subscribedTo
           
protected  java.util.ArrayList subscribers
           
protected  ProofMonitor supportProofMonitor
           
(package private)  int tsortIndex
           
protected  DelegationXML xml
           
 
Constructor Summary
(package private) DelegationWrapper(Delegation d, DelegationXML dxml)
          Create a DelegationWrapper and subscribe to the delegation's home.
(package private) DelegationWrapper(Delegation d, DelegationXML dxml, boolean subscribeToHome)
          Create a DelegationWrapper and optionally subscribe to the delegation's home.
 
Method Summary
 void addSubscriber(WalletSubscriber sub)
          Request that a class be informed of any changes in this delegation's status
 java.util.HashSet collectSupport()
          Internal Function: This is the non recursive version of collectSupportRecursive()
 java.util.HashSet collectSupportRecursive()
          Internal Function: This recursive version of collectSupport is used in remote transactions, when a wallet must send the full set of delegations that support a relationship to another host.
 AttributeSet getAttributes()
           
 Delegation getDeleg()
           
 Role getIssuer()
           
 Role getObject()
           
 Role getSubject()
           
 DelegationXML getXML()
           
 int hashCode()
           
 boolean isThirdParty()
           
 void proofChanged(ProofChangedEvent e)
          Called by the proofChangedMonitor when the Delegation is validated or invalidated
 void removeSubscriber(WalletSubscriber sub)
          Remove a class from the subscriber list
 void setProofMonitor(ProofMonitor pm)
          Internal Function
 java.lang.String toLongString()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

deleg

protected Delegation deleg

status

protected boolean status

subscribedTo

protected HomeSubscription subscribedTo

subscribers

protected java.util.ArrayList subscribers

supportProofMonitor

protected ProofMonitor supportProofMonitor

xml

protected DelegationXML xml

tsortIndex

int tsortIndex
Constructor Detail

DelegationWrapper

DelegationWrapper(Delegation d,
                  DelegationXML dxml)
Create a DelegationWrapper and subscribe to the delegation's home.

Parameters:
d - the delegation in question
dxml - the XML representaiton of the delegation in question

DelegationWrapper

DelegationWrapper(Delegation d,
                  DelegationXML dxml,
                  boolean subscribeToHome)
Create a DelegationWrapper and optionally subscribe to the delegation's home.

Parameters:
d - the delegation in question
dxml - the XML representaiton of the delegation in question
subscribeToHome - true if you want to subscribe to the delegation's home
Method Detail

hashCode

public int hashCode()

collectSupportRecursive

public java.util.HashSet collectSupportRecursive()
Internal Function: This recursive version of collectSupport is used in remote transactions, when a wallet must send the full set of delegations that support a relationship to another host. Essentially a depth-first-search for all relevant support delegations of each delegation in the DelegationWrapper's ProofMonitor.


collectSupport

public java.util.HashSet collectSupport()
Internal Function: This is the non recursive version of collectSupportRecursive()


setProofMonitor

public void setProofMonitor(ProofMonitor pm)
Internal Function


proofChanged

public void proofChanged(ProofChangedEvent e)
Called by the proofChangedMonitor when the Delegation is validated or invalidated

Specified by:
proofChanged in interface ProofChangedListener

addSubscriber

public void addSubscriber(WalletSubscriber sub)
Request that a class be informed of any changes in this delegation's status

Parameters:
sub - the class that will recieve updates

removeSubscriber

public void removeSubscriber(WalletSubscriber sub)
Remove a class from the subscriber list

Parameters:
sub - the class that is recieving updates

getDeleg

public Delegation getDeleg()
Returns:
the delegation in question

getSubject

public Role getSubject()
Returns:
the subject of the delegation in question

getObject

public Role getObject()
Returns:
the object of the delegation in question

getIssuer

public Role getIssuer()
Returns:
the issuer of the delegation in question

getAttributes

public AttributeSet getAttributes()
Returns:
the attributes of the delegation in question

isThirdParty

public boolean isThirdParty()
Returns:
if this delegation is a third party delegation

getXML

public DelegationXML getXML()
Returns:
the xml representation of this delegation

toString

public java.lang.String toString()
Returns:
the delegation in a human readable form

toLongString

public java.lang.String toLongString()
Returns:
the delegation in a long human readable form


Copyright (c) 2002-2003 New York University RLAB