it.unitn.ds.peersim.messages
Class ConsensusMessage

java.lang.Object
  extended by it.unitn.ds.peersim.messages.GenericMessage
      extended by it.unitn.ds.peersim.messages.ConsensusMessage
All Implemented Interfaces:
Message

public class ConsensusMessage
extends GenericMessage

Distributed Systems Course Project

Year: 2009/2010

University of Trento

ConsensusMessage -. Implements a consensus message by extending the GenericMessage class used in the consensus protocol.

Version:
1.0
Author:
Avancini Mattia, Giampaolo Farina
See Also:
http://peersim.sourceforge.net/

Constructor Summary
ConsensusMessage(ConsensusMessageType messageType, int protocolID, long messageID, peersim.core.Node sender, peersim.core.Node receiver, java.lang.Object payload)
          Instantiates a new consensus message.
 
Method Summary
 ConsensusMessageType getMessageType()
          Gets the message type.
 java.lang.String toString()
          To string.
 
Methods inherited from class it.unitn.ds.peersim.messages.GenericMessage
getMessageID, getPayload, getProtocolID, getReceiver, getSender, setReceiver
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConsensusMessage

public ConsensusMessage(ConsensusMessageType messageType,
                        int protocolID,
                        long messageID,
                        peersim.core.Node sender,
                        peersim.core.Node receiver,
                        java.lang.Object payload)
Instantiates a new consensus message.

Parameters:
messageType - the message type.
protocolID - the protocol id.
messageID - the message id.
sender - the sender.
receiver - the receiver.
payload - the payload.
Method Detail

getMessageType

public ConsensusMessageType getMessageType()
Gets the message type.

Returns:
the messageType

toString

public java.lang.String toString()
Description copied from interface: Message
To string.

Specified by:
toString in interface Message
Overrides:
toString in class GenericMessage
Returns:
the string
See Also:
Object.toString()