viceroy.net
Class FindRelativeMessage

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

public class FindRelativeMessage
extends java.lang.Object
implements Message

A 'find relative' message. Represents a message that contains all the data that is relevant for a message that finds a relative for a certain peer.

Author:
Anat Talmy
, Oren Dobzinski

Field Summary
private  ViceroyPeer searcher
          The peer which seek for a relative
private  Relative typeOfRelative
          The type of the relative which is searched
 
Constructor Summary
FindRelativeMessage(ViceroyPeer _searcher, Relative _typeOfRelative)
          creates a new find relative message
 
Method Summary
 ViceroyPeer getSearcher()
          gets the searcher
 MessageType getType()
          gets the type of the message
 Relative getTypeOfRelative()
          gets the searcher
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

searcher

private ViceroyPeer searcher
The peer which seek for a relative


typeOfRelative

private Relative typeOfRelative
The type of the relative which is searched

Constructor Detail

FindRelativeMessage

public FindRelativeMessage(ViceroyPeer _searcher,
                           Relative _typeOfRelative)
creates a new find relative message

Parameters:
_searcher - the peer that initiated this search
_typeOfRelative - the type of relative searched
See Also:
viceroy.Relative.LEFT_CHILD, viceroy.Relative.RIGHT_CHILD, viceroy.Relative.PARENT
Method Detail

getSearcher

public ViceroyPeer getSearcher()
gets the searcher

Returns:
the searcher

getTypeOfRelative

public Relative getTypeOfRelative()
gets the searcher

Returns:
the searcher

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