content
content record component.sendSync - whether sending the message should block the current thread until the message is flushed.prioritized - whether this channel message should be handled with priority over other channel messages.channel - the channel to which the channel message gets sent. Mostly for identification reasons.message - the message key of this channel message. Mostly for identification reasons.content - the content of this channel message (the actual data to send).sender - the sender of the channel message. Should be, but must not the current network component.targets - the targets to which the channel message should get send.A channel message has two main identification points. One is the channel to which the message gets sent. The channel is a string object which is generally used to collect multiple types of channel message to a collection of message types. On the other hand a channel message contains a message object which should be unique within in the network and is used to identify a channel message in a group messages sent to the same channel.
The message contains a DataBuf containing the actual content of the message. There is no real way to identify
which types are in the buffer or not, therefore it is crucial that a channel message gets identified via its channel
and/or message.
If targets were given that are not locatable in the network they will get ignored silently. On the other hand this means that if you try to send a channel message to a non-existing target, the send method will block until the future wait timeout (30 seconds by default) expired before returning.
Note: there is no guarantee that the sender of a channel message is the actual component sending the message, as the message can be modified on its way to the receiver.
The actual constructor of this class shouldn't get used. Use builder() instead.
static final class channel record component.content record component.message record component.private final booleanprioritized record component.private final @NonNull ChannelMessageSendersender record component.private final booleansendSync record component.private final @NonNull Collection<ChannelMessageTarget>targets record component.ChannelMessage(boolean sendSync,
boolean prioritized,
@NonNull String channel,
@NonNull String message,
@NonNull DataBuf content,
@NonNull ChannelMessageSender sender,
@NonNull Collection<ChannelMessageTarget> targets) ChannelMessage record class.static @NonNull ChannelMessage.Builderbuilder()static @NonNull ChannelMessage.Builderchannel()channel record component.content()content record component.final booleanfinal inthashCode()message()message record component.private @NonNull CloudMessengerbooleanprioritized record component.voidsend()sender()sender record component.@NonNull eu.cloudnetservice.common.concurrent.Task<Collection<ChannelMessage>>@NonNull eu.cloudnetservice.common.concurrent.Task<ChannelMessage>booleansendSync()sendSync record component.targets()targets record component.final StringtoString()sendSync record component.prioritized record component.channel record component.message record component.content record component.sender record component.targets record component.ChannelMessage record class.sendSync - the value for the sendSync record componentprioritized - the value for the prioritized record componentchannel - the value for the channel record componentmessage - the value for the message record componentcontent - the value for the content record componentsender - the value for the sender record componenttargets - the value for the targets record componentinput - the channel message to respond to.NullPointerException - if the given input is null.CloudMessenger.sendChannelMessage(ChannelMessage). This method will not wait for the target component
to respond (it doesn't even expect a response) but for the handling component to send the message.CloudMessenger.sendChannelMessageQueryAsync(ChannelMessage). The future will be
completed when the target component responds or the query future times out (after 30 seconds).CloudMessenger.sendSingleChannelMessageQueryAsync(ChannelMessage). The future will be
completed when one target component responds or the query future times out (after 30 seconds).CloudMessenger.sendChannelMessageQuery(ChannelMessage).CloudMessenger.sendSingleChannelMessageQueryAsync(ChannelMessage).Objects::equals(Object,Object); primitive components are compared with '=='.sendSync record component.sendSync record componentprioritized record component.prioritized record componentchannel record component.channel record componentmessage record component.message record componentcontent record component.content record componentsender record component.sender record componenttargets record component.targets record component