Package i5.las2peer.p2p.pastry
Class MessageEnvelope
java.lang.Object
i5.las2peer.p2p.pastry.MessageEnvelope
- All Implemented Interfaces:
Serializable,rice.p2p.commonapi.Message
a simple envelope for sending las2peer messages through the pastry network
- 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
ConstructorsConstructorDescriptionMessageEnvelope(rice.p2p.commonapi.NodeHandle sendingNode, Message content) generate an Pastry message envelope from a las2peer messageMessageEnvelope(rice.p2p.commonapi.NodeHandle sendingNode, String content) create a message envelope with simple string content -
Method Summary
Modifier and TypeMethodDescriptionget the contained las2peer messageget the content string of this messageintrice.p2p.commonapi.NodeHandleget a handle to the sending node
-
Constructor Details
-
MessageEnvelope
create a message envelope with simple string content- Parameters:
sendingNode- A sending node handlecontent- Arbitrary message content string
-
MessageEnvelope
generate an Pastry message envelope from a las2peer message- Parameters:
sendingNode- A sending node handlecontent- Another message to wrap
-
-
Method Details
-
getSendingNode
public rice.p2p.commonapi.NodeHandle getSendingNode()get a handle to the sending node- Returns:
- handle to the sending (pastry) node
-
getContent
get the content string of this message- Returns:
- the contained data as String
-
getContainedMessage
get the contained las2peer message- Returns:
- the contained las2peer message
- Throws:
MalformedXMLException- If the XML data string is malformed
-
getPriority
public int getPriority()- Specified by:
getPriorityin interfacerice.p2p.commonapi.Message
-