P-Grid v2.0a2 API Specification

p2p.basic
Interface Message


public interface Message

Defines a message that peers exchange. Most systems will use multiple types of messages in their protocols, and thus several implementations of this interface will be required.


Method Summary
 byte[] getData()
          Get the message content.
 GUID getGUID()
          Get the message's guid.
 

Method Detail

getGUID

GUID getGUID()
Get the message's guid. Useful to determine if a message has already been observed previously.

Returns:
the global unique identifier

getData

byte[] getData()
Get the message content.

Returns:
a binary representation of the message

P-Grid v2.0a2 API Specification

This is open source software distributed under the terms of the GNU General Public License, a copy of which is included in the file LICENSE. If not you can find the GPL at http://www.gnu.org/copyleft/gpl.txt