Package org.sim0mq.message
Class Sim0MQReply.Builder<B extends Sim0MQMessage.Builder<B>>
java.lang.Object
org.sim0mq.message.Sim0MQMessage.Builder<B>
org.sim0mq.message.Sim0MQReply.Builder<B>
- Type Parameters:
B
- the actual inherited builder for the return types.
- Direct Known Subclasses:
HB2AliveMessage.Builder
,MC1StatusMessage.Builder
,MC2AckNakMessage.Builder
- Enclosing class:
- Sim0MQReply
public abstract static class Sim0MQReply.Builder<B extends Sim0MQMessage.Builder<B>>
extends Sim0MQMessage.Builder<B>
Builder for the Sim0MQReply. Can string setters together, and call build() at the end to build the actual message.
Copyright (c) 2016-2024 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See Sim0MQ License.
- Author:
- Alexander Verbraeck
-
Field Summary
Modifier and TypeFieldDescriptionprotected Object
The unique message id (Frame 5) of the sender for which this is the reply.Fields inherited from class org.sim0mq.message.Sim0MQMessage.Builder
federationId, messageId, messageTypeId, receiverId, senderId
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract Sim0MQReply
build()
Build the object.final B
setReplyTo
(Sim0MQMessage message) final B
setReplyToId
(Object newReplyToId) Methods inherited from class org.sim0mq.message.Sim0MQMessage.Builder
setMessageId, setMessageTypeId, setReceiverId, setSenderId, setSimulationRunId
-
Field Details
-
replyToId
The unique message id (Frame 5) of the sender for which this is the reply.
-
-
Constructor Details
-
Builder
public Builder()Empty constructor.
-
-
Method Details
-
setReplyToId
- Parameters:
newReplyToId
- set replyToId- Returns:
- the original object for chaining
-
setReplyTo
- Parameters:
message
- set replyToId and receiver based on the message to which this is a reply- Returns:
- the original object for chaining
-
build
Description copied from class:Sim0MQMessage.Builder
Build the object.- Specified by:
build
in classSim0MQMessage.Builder<B extends Sim0MQMessage.Builder<B>>
- Returns:
- the message object from the builder.
- Throws:
Sim0MQException
- on unknown data typeNullPointerException
- when one of the parameters is null
-