viceroy.net
Class LookupAnswerMessage

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

public final class LookupAnswerMessage
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  ViceroyPeer answer
          the value to lookup
private  MessagePath path
          the path that the lookup message went through
private  Resource valueLookedUp
          the value that was looked up
 
Constructor Summary
LookupAnswerMessage(ViceroyPeer _answer, Resource _valueLookedUp, MessagePath _path)
          generates a new message
 
Method Summary
 ViceroyPeer getAnswer()
          gets the peer which holds the looked up resource
 MessagePath getLookupPath()
          gets the path that the lookup message went through
 MessageType getType()
          gets the type of the message
 Resource getValueLookedUp()
          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

answer

private ViceroyPeer answer
the value to lookup


valueLookedUp

private Resource valueLookedUp
the value that was looked up


path

private MessagePath path
the path that the lookup message went through

Constructor Detail

LookupAnswerMessage

public LookupAnswerMessage(ViceroyPeer _answer,
                           Resource _valueLookedUp,
                           MessagePath _path)
generates a new message

Method Detail

getAnswer

public ViceroyPeer getAnswer()
gets the peer which holds the looked up resource

Returns:
the the peer which holds the looked up resource

getValueLookedUp

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

Returns:
the value that was looked up

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

getLookupPath

public MessagePath getLookupPath()
gets the path that the lookup message went through

Returns:
the path that the lookup message went through