Naanou.LookupService
Class RequestForwarder

Maintains a list of nodes which a request can be forwarded too, and makes sure requests get to someone alive.

Field Summary
Naanou.LookupService.NodeAddress ideal
int MAXIMUM_RECURSION
         Maximum number of fingers to try
int MAXIMUM_RETRIES
         Maximum number of retries for requests before giving up on a node
System.Collections.ArrayList others
Naanou.LookupService.FingerTable table

Constructor Summary
RequestForwarder(Naanou.LookupService.NodeAddress ideal, Naanou.LookupService.FingerTable table)
         Constructor
RequestForwarder(Naanou.LookupService.FingerTable table, System.Collections.ArrayList others)
        

Property Summary
Naanou.LookupService.NodeAddress Ideal
         Gets or sets the ideal address
Naanou.LookupService.FingerTable Table
         Gets or sets the finger table

Method Summary
object GetMethod(Naanou.LookupService.NodeAddress toUse, int index, System.Reflection.MemberInfo pi, object[] indexer)
object GetProperty(System.Reflection.PropertyInfo pi, object[] index)
         Gets the value of a property
object GetProperty(string property, object[] index)
         Gets the value of a property
object Invoke(System.Reflection.MethodInfo mi, object[] parameters)
         Invokes a method
object Invoke(string method, object[] parameters)
         Invokes a method

Methods inherited from class System.Object
Equals, Finalize, GetHashCode, GetType, MemberwiseClone, ToString

Event Summary
Naanou.LookupService.NodeLostHandler NodeLost
         Node has been lose


Field Detail

ideal

private Naanou.LookupService.NodeAddress ideal


MAXIMUM_RECURSION

private int MAXIMUM_RECURSION

Maximum number of fingers to try


MAXIMUM_RETRIES

public int MAXIMUM_RETRIES

Maximum number of retries for requests before giving up on a node


others

private System.Collections.ArrayList others


table

private Naanou.LookupService.FingerTable table

Constructor Detail

RequestForwarder

public RequestForwarder(Naanou.LookupService.NodeAddress ideal,
                        Naanou.LookupService.FingerTable table)

Constructor

Parameters:
ideal - Ideal node to use
table - Table to use for locating other node alternatives

RequestForwarder

public RequestForwarder(Naanou.LookupService.FingerTable table,
                        System.Collections.ArrayList others)

Parameters:
table -
others - Array of NodeAddresses
Property Detail

Ideal

public Naanou.LookupService.NodeAddress Ideal

Gets or sets the ideal address


Table

public Naanou.LookupService.FingerTable Table

Gets or sets the finger table

Method Detail

GetMethod

private object GetMethod(Naanou.LookupService.NodeAddress toUse,
                         int index,
                         System.Reflection.MemberInfo pi,
                         object[] indexer)


GetProperty

public object GetProperty(System.Reflection.PropertyInfo pi,
                          object[] index)

Gets the value of a property

Parameters:
pi - Property
index - Index
Returns:
Value of property

GetProperty

public object GetProperty(string property,
                          object[] index)

Gets the value of a property

Parameters:
property - Property
index - Index
Returns:
Value of property

Invoke

public object Invoke(System.Reflection.MethodInfo mi,
                     object[] parameters)

Invokes a method

Parameters:
mi - Method
parameters - Parameters
Returns:
Result

Invoke

public object Invoke(string method,
                     object[] parameters)

Invokes a method

Parameters:
method - Method
parameters - Parameters
Returns:
Result
Event Detail

NodeLost

public Naanou.LookupService.NodeLostHandler NodeLost

Node has been lose