Class BroadcastMessage
java.lang.Object
pt.unl.fct.di.novasys.babel.generic.ProtoMessage
pt.unl.fct.di.novasys.babel.protocols.dissemination.messages.IdentifiableProtoMessage
protocols.broadcast.flood.messages.BroadcastMessage
public class BroadcastMessage
extends pt.unl.fct.di.novasys.babel.protocols.dissemination.messages.IdentifiableProtoMessage
The flood's own wire message. It extends
IdentifiableProtoMessage, the
canonical ParadigmShift base for broadcast messages: a UUID message-id
(the "MID") is generated when the broadcast protocol creates the message,
carried unchanged across every hop, and used to deduplicate. The broadcast
protocol dedups on IdentifiableProtoMessage.getMID() and calls
generateDeliveryNotification(short) to build the application-facing
BroadcastDelivery — so the message id lives on the message, not in the
protocol's send path. (Same pattern as the production GossipMessage.)
Besides the inherited MID it carries the original sender and the issue timestamp (so every receiver reconstructs an identical delivery) and the opaque application payload.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final shortstatic final pt.unl.fct.di.novasys.network.ISerializer<BroadcastMessage> -
Constructor Summary
ConstructorsConstructorDescriptionBroadcastMessage(pt.unl.fct.di.novasys.network.data.Host sender, Timestamp timestamp, byte[] content) A fresh broadcast initiated locally —IdentifiableProtoMessageassigns a new MID. -
Method Summary
Modifier and TypeMethodDescriptionpt.unl.fct.di.novasys.babel.protocols.dissemination.notifications.BroadcastDeliverygenerateDeliveryNotification(short sourceProtoID) byte[]pt.unl.fct.di.novasys.network.data.HosttoString()Methods inherited from class pt.unl.fct.di.novasys.babel.protocols.dissemination.messages.IdentifiableProtoMessage
getMIDMethods inherited from class pt.unl.fct.di.novasys.babel.generic.ProtoMessage
getId
-
Field Details
-
MSG_ID
public static final short MSG_ID- See Also:
-
serializer
-
-
Constructor Details
-
BroadcastMessage
public BroadcastMessage(pt.unl.fct.di.novasys.network.data.Host sender, Timestamp timestamp, byte[] content) A fresh broadcast initiated locally —IdentifiableProtoMessageassigns a new MID.
-
-
Method Details
-
generateDeliveryNotification
public pt.unl.fct.di.novasys.babel.protocols.dissemination.notifications.BroadcastDelivery generateDeliveryNotification(short sourceProtoID) - Specified by:
generateDeliveryNotificationin classpt.unl.fct.di.novasys.babel.protocols.dissemination.messages.IdentifiableProtoMessage
-
getSender
public pt.unl.fct.di.novasys.network.data.Host getSender() -
getTimestamp
-
getContent
public byte[] getContent() -
toString
-