viceroy.net
Class LookupMessage

java.lang.Object
  |
  +--viceroy.net.LookupMessage
All Implemented Interfaces:
Message

public final class LookupMessage
extends java.lang.Object
implements Message

A lookup message. represents a lookup requset that was sent by some peer

Author:
Anat Talmy
, Oren Dobzinski

Field Summary
private  LookupPeer address
          the return address
private  LookupAlgorithm method
          the lookup method - which lookup algorithm to use
private  Resource value
          the value to lookup
 
Constructor Summary
LookupMessage(Resource valueToLook, LookupPeer returnAddress, LookupAlgorithm _method)
          generates the first lookup message in the path.
 
Method Summary
 LookupAlgorithm getLookupAlgorithm()
          gets the lookup method - which lookup algorithm to use
 LookupPeer getReturnAddress()
          gets the viceroy peer that the answer message should be sent to
 MessageType getType()
          gets the type of the message
 Resource getValueToLook()
          gets the value that was looked up
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

value

private Resource value
the value to lookup


address

private LookupPeer address
the return address


method

private LookupAlgorithm method
the lookup method - which lookup algorithm to use

Constructor Detail

LookupMessage

public LookupMessage(Resource valueToLook,
                     LookupPeer returnAddress,
                     LookupAlgorithm _method)
generates the first lookup message in the path.

Parameters:
valueToLook - the value to look for
returnAddress - the peer that looked this value up
Method Detail

getValueToLook

public Resource getValueToLook()
gets the value that was looked up

Returns:
the value that was looked up

getReturnAddress

public LookupPeer getReturnAddress()
gets the viceroy peer that the answer message should be sent to

Returns:
the viceroy peer that the answer message should be sent to

getType

public MessageType getType()
gets the type of the message

Specified by:
getType in interface Message
Returns:
the type of the message
See Also:
MessageType

getLookupAlgorithm

public LookupAlgorithm getLookupAlgorithm()
gets the lookup method - which lookup algorithm to use

Returns:
the lookup method - which lookup algorithm to use