Class DefaultMessenger
java.lang.Object
eu.cloudnetservice.driver.provider.defaults.DefaultMessenger
- All Implemented Interfaces:
CloudMessenger
An abstract helper implementation of the cloud messenger which can be shared over all further implementations.
- Since:
- 4.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionsendSingleChannelMessageQuery(@NonNull ChannelMessage channelMessage) Sends the given channel message to all of its targets and waits for all responses to be present or the query to time out.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface eu.cloudnetservice.driver.provider.CloudMessenger
sendChannelMessage, sendChannelMessageAsync, sendChannelMessageQuery, sendChannelMessageQueryAsync, sendSingleChannelMessageQueryAsync
-
Constructor Details
-
DefaultMessenger
public DefaultMessenger()
-
-
Method Details
-
sendSingleChannelMessageQuery
@Nullable public @Nullable ChannelMessage sendSingleChannelMessageQuery(@NonNull @NonNull ChannelMessage channelMessage) Sends the given channel message to all of its targets and waits for all responses to be present or the query to time out. This method will then peek the first response out of the returned array, or return null if no components answered to the request.- Specified by:
sendSingleChannelMessageQueryin interfaceCloudMessenger- Parameters:
channelMessage- the channel message to send.- Returns:
- the first response to the given channel message, can be null if no target responded.
-