Class SearchAnswerMessage

java.lang.Object
i5.las2peer.p2p.pastry.SearchAnswerMessage
All Implemented Interfaces:
Serializable, rice.p2p.commonapi.Message

public class SearchAnswerMessage extends Object implements rice.p2p.commonapi.Message
A message as answer to a SearchAgentContent indicating that the requested agent is running at the sending node of this response message
See Also:
  • Field Summary

    Fields inherited from interface rice.p2p.commonapi.Message

    DEFAULT_PRIORITY, HIGH_PRIORITY, LOW_PRIORITY, LOWEST_PRIORITY, MAX_PRIORITY, MEDIUM_HIGH_PRIORITY, MEDIUM_LOW_PRIORITY, MEDIUM_PRIORITY
  • Constructor Summary

    Constructors
    Constructor
    Description
    SearchAnswerMessage(rice.p2p.commonapi.NodeHandle from, SearchAgentContent search)
    create a new answer for the given search request
    SearchAnswerMessage(rice.p2p.commonapi.NodeHandle to, rice.p2p.commonapi.NodeHandle from, long answerToId)
    create a new answer
  • Method Summary

    Modifier and Type
    Method
    Description
    int
     
    rice.p2p.commonapi.NodeHandle
    get the (designated) receiver of this answer
    long
    get the id of the original search request
    rice.p2p.commonapi.NodeHandle
    get the origin node of this answer

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SearchAnswerMessage

      public SearchAnswerMessage(rice.p2p.commonapi.NodeHandle to, rice.p2p.commonapi.NodeHandle from, long answerToId)
      create a new answer
      Parameters:
      to - A node handle to answer to
      from - A sending node handle
      answerToId - id of the SearchAgentContent message this one is a response to
    • SearchAnswerMessage

      public SearchAnswerMessage(rice.p2p.commonapi.NodeHandle from, SearchAgentContent search)
      create a new answer for the given search request
      Parameters:
      from - A sending node handle
      search - A search result content
  • Method Details

    • getPriority

      public int getPriority()
      Specified by:
      getPriority in interface rice.p2p.commonapi.Message
    • getSendingNode

      public rice.p2p.commonapi.NodeHandle getSendingNode()
      get the origin node of this answer
      Returns:
      a node handle
    • getRecievingNode

      public rice.p2p.commonapi.NodeHandle getRecievingNode()
      get the (designated) receiver of this answer
      Returns:
      a node handle
    • getRequestMessageId

      public long getRequestMessageId()
      get the id of the original search request
      Returns:
      id of the original search request