edu.nyu.cs.pdsg.drbac
Class TwoWaySearchEngine

java.lang.Object
  extended byedu.nyu.cs.pdsg.drbac.SearchEngine
      extended byedu.nyu.cs.pdsg.drbac.TwoWaySearchEngine

public class TwoWaySearchEngine
extends SearchEngine

Utlitity class: Used to look up credentials on remote hosts


Constructor Summary
TwoWaySearchEngine()
          Initialize the SearchEngine
 
Method Summary
(package private)  void answerRemoteQuery(java.io.InputStream is, java.io.OutputStream os)
          Internal: answer a remote query
protected  Role findSearchableRole(SearchAccumulator subSearchAccum, SearchAccumulator objSearchAccum)
          Look at both the subject and object search accumulator, and return a role from either that has not yet been searched.
protected  boolean insertNewDelegations(java.util.ArrayList remDelegs, LocalProver subjProver, LocalProver objProver)
          Insert the remotely-received delegations into the local wallet.
protected  java.util.ArrayList queryRemoteWallet(java.net.InetAddress ip, int port, RoleId walletRoleId, LocalProver prover, Role obj, AttributeSet oas)
          Internal: socket-level communication for querying a remote wallet
 
Methods inherited from class edu.nyu.cs.pdsg.drbac.SearchEngine
prove, prove, remSearch, sendDelegationSet
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TwoWaySearchEngine

public TwoWaySearchEngine()
Initialize the SearchEngine

Method Detail

findSearchableRole

protected Role findSearchableRole(SearchAccumulator subSearchAccum,
                                  SearchAccumulator objSearchAccum)
Look at both the subject and object search accumulator, and return a role from either that has not yet been searched. Later it will choose the role that has the least distance, in the graph, from the ultimate subject or object

Specified by:
findSearchableRole in class SearchEngine

insertNewDelegations

protected boolean insertNewDelegations(java.util.ArrayList remDelegs,
                                       LocalProver subjProver,
                                       LocalProver objProver)
Insert the remotely-received delegations into the local wallet. If the subject of the delegation exists in the localProver's searchAccumulator, search from that subject to the desired object. Likewise, if the object of that delegation exists in the localProver's searchAccumulator, search from that object to the desired subject. Return true if you find a path to the ultimate object, otherwise false.

Specified by:
insertNewDelegations in class SearchEngine

queryRemoteWallet

protected java.util.ArrayList queryRemoteWallet(java.net.InetAddress ip,
                                                int port,
                                                RoleId walletRoleId,
                                                LocalProver prover,
                                                Role obj,
                                                AttributeSet oas)
                                         throws CredentialException,
                                                java.io.IOException
Internal: socket-level communication for querying a remote wallet

Specified by:
queryRemoteWallet in class SearchEngine
Throws:
CredentialException
java.io.IOException

answerRemoteQuery

void answerRemoteQuery(java.io.InputStream is,
                       java.io.OutputStream os)
Internal: answer a remote query

Specified by:
answerRemoteQuery in class SearchEngine


Copyright (c) 2002-2003 New York University RLAB