netcom.mds
Class SearchRequest

java.lang.Object
  extended bynetcom.mds.AbstractRequest
      extended bynetcom.mds.SearchRequest
All Implemented Interfaces:
java.io.Serializable

public final class SearchRequest
extends AbstractRequest

Title: Search Request

Description: This class represents a search request for a search initiated by a PClient attempting to find a match with name list pairs

Copyright: Copyright (c) 2002

Company: NETCOM

See Also:
Serialized Form

Field Summary
 boolean is_bloom_guess
          This says whether this search request is a bloom guess or not, thus allowing this search request to not be propogated if it was a true "bloom guess" and the recieving MDS node is using the "bloom search mode" This field is modified by an MDS Node after instantiation
 AddressPort mdsproxy_originator
          This is a socketaddress giving the information of where the mdsproxy is which originated the request
 java.util.List[] name_list_pairs
          This is the List array which holds all the name list pairs.
 java.lang.String originator_name
          This is the login name of the PClient which created this request
 java.lang.String search_id
          This is the search ID as given from the PClient and parsed from the XML
 java.lang.String yaup_message_id
          This is the YAUP Message ID of the original XML request
 
Fields inherited from class netcom.mds.AbstractRequest
socket_originator
 
Constructor Summary
SearchRequest(java.lang.String socket_originator, java.lang.String originator_name, AddressPort mdsproxy_originator, java.lang.String yaup_message_id, java.lang.String search_id, java.util.List[] name_list_pairs)
          This created a SearchRequest representing a PClient asking the MDS cloud to do a search for shares matching name-list-pairs provided.
 
Method Summary
 void addMDSHistory(AddressPort added_node)
          This method adds an InetSocketAddress to this search object's internal data structures.
 boolean checkMDSHistory(AddressPort in_address)
          This method checks the internal data structure to see if the input MDS Node information has been seen before (ie The request has already passed though the given MDS Node)
 java.lang.String getBloomString()
          Converts a SearchRequest to a String of matching name-list-pairs
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mdsproxy_originator

public AddressPort mdsproxy_originator
This is a socketaddress giving the information of where the mdsproxy is which originated the request


originator_name

public final java.lang.String originator_name
This is the login name of the PClient which created this request


search_id

public final java.lang.String search_id
This is the search ID as given from the PClient and parsed from the XML


yaup_message_id

public final java.lang.String yaup_message_id
This is the YAUP Message ID of the original XML request


is_bloom_guess

public boolean is_bloom_guess
This says whether this search request is a bloom guess or not, thus allowing this search request to not be propogated if it was a true "bloom guess" and the recieving MDS node is using the "bloom search mode" This field is modified by an MDS Node after instantiation


name_list_pairs

public final java.util.List[] name_list_pairs
This is the List array which holds all the name list pairs. It is organized so that each index of the array has a "name" and its matching pairs. The First item of each list then stands for the "name" while every subsequent item in the list is a matching pair to that first name This List MUST be filled with Strings only

Constructor Detail

SearchRequest

public SearchRequest(java.lang.String socket_originator,
                     java.lang.String originator_name,
                     AddressPort mdsproxy_originator,
                     java.lang.String yaup_message_id,
                     java.lang.String search_id,
                     java.util.List[] name_list_pairs)
This created a SearchRequest representing a PClient asking the MDS cloud to do a search for shares matching name-list-pairs provided. The MDSProxy parses the PClient XML request and creates this object to send to MDS nodes which use it for the search algorithm

Parameters:
socket_originator - this is the original socket.toString() between the PClient and MDSProxy, used for routing
originator_name - this is the login name of the PClient who initiated the request, used for access verification
mdsproxy_originator - this is identifying information which allows Search Returns to reach the originating MDSProxy
yaup_message_id - YUAP message ID for this search request
search_id - this is a String passed in by the PClient via XML identifying this search
name_list_pairs - this is the name-list-pair array representing the inquiry see field "name_list_pairs"
Method Detail

getBloomString

public java.lang.String getBloomString()
Converts a SearchRequest to a String of matching name-list-pairs


addMDSHistory

public void addMDSHistory(AddressPort added_node)
This method adds an InetSocketAddress to this search object's internal data structures. This InetSocketAddress must be the identifying socket and address for an MDSNode. This gives the request a history of where it has visited and prevents looping of requests within the network

Parameters:
added_node - an InetSocketAddress representing the node to add as visited

checkMDSHistory

public boolean checkMDSHistory(AddressPort in_address)
This method checks the internal data structure to see if the input MDS Node information has been seen before (ie The request has already passed though the given MDS Node)

Returns:
boolean 'true' if it the input SocketAddress HAS been seen before (ie we looped)