Package i5.las2peer.p2p.pastry
Class SearchAnswerMessage
java.lang.Object
i5.las2peer.p2p.pastry.SearchAnswerMessage
- All Implemented Interfaces:
Serializable
,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
ConstructorsConstructorDescriptionSearchAnswerMessage
(rice.p2p.commonapi.NodeHandle from, SearchAgentContent search) create a new answer for the given search requestSearchAnswerMessage
(rice.p2p.commonapi.NodeHandle to, rice.p2p.commonapi.NodeHandle from, long answerToId) create a new answer -
Method Summary
Modifier and TypeMethodDescriptionint
rice.p2p.commonapi.NodeHandle
get the (designated) receiver of this answerlong
get the id of the original search requestrice.p2p.commonapi.NodeHandle
get the origin node of this answer
-
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 tofrom
- A sending node handleanswerToId
- id of theSearchAgentContent
message this one is a response to
-
SearchAnswerMessage
create a new answer for the given search request- Parameters:
from
- A sending node handlesearch
- A search result content
-
-
Method Details
-
getPriority
public int getPriority()- Specified by:
getPriority
in interfacerice.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
-