me.edwards.des.net.packet
Class PacketBallot
java.lang.Object
me.edwards.des.net.packet.Packet
me.edwards.des.net.packet.PacketBallot
public class PacketBallot
- extends Packet
Ballot Packet
This packet is used to transfer Ballot
data between Nodes.
Created on: Nov 3, 2015 at 10:28:29 AM
- Author:
- Matthew Edwards
Method Summary |
Ballot |
getBallot()
Returns the Ballot transferred by this Packet. |
byte[] |
getBinary()
Returns the binary payload of this Packet as a byte array. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ballot
private Ballot ballot
PacketBallot
public PacketBallot(Ballot ballot)
- Creates new PacketBallot
- Parameters:
ballot
- Ballot
payload
PacketBallot
public PacketBallot(byte[] binary)
- Creates new PacketBallot from binary data
- Parameters:
binary
- Packet binary data as byte array
getBallot
public Ballot getBallot()
- Returns the
Ballot
transferred by this Packet.
- Returns:
- Ballot payload
getBinary
public byte[] getBinary()
- Description copied from class:
Packet
- Returns the binary payload of this Packet as a byte array.
- Specified by:
getBinary
in class Packet
- Returns:
- Binary payload as a byte array