viceroy.net
Class InboundRelativeMessage

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

public class InboundRelativeMessage
extends java.lang.Object
implements Message

An 'inbound relative' message. Represents a message that contains all the data that is relevant for a message that inbounds a relative for a certain peer.

Since:
1.4
Author:
Anat Talmy
, Oren Dobzinski

Field Summary
private  ViceroyPeer inbound
          this is my inbound connection: inbound chose me as its relative
private  Relative typeOfRelative
          the type of relative
 
Constructor Summary
InboundRelativeMessage(ViceroyPeer _inbound, Relative _typeOfRelative)
          creates a new inbound relative message
 
Method Summary
 ViceroyPeer getInbound()
          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

inbound

private ViceroyPeer inbound
this is my inbound connection: inbound chose me as its relative


typeOfRelative

private Relative typeOfRelative
the type of relative

Constructor Detail

InboundRelativeMessage

public InboundRelativeMessage(ViceroyPeer _inbound,
                              Relative _typeOfRelative)
creates a new inbound relative message

Parameters:
_inbound - the peer that chose me as its relative
_typeOfRelative - the type of relative searched
See Also:
viceroy.Relative.LEFT_CHILD, viceroy.Relative.RIGHT_CHILD, viceroy.Relative.PARENT
Method Detail

getInbound

public ViceroyPeer getInbound()
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