Interface MessageChannel.Sender<P extends ChannelPayload>
- Type Parameters:
P- the payload type
- Enclosing interface:
MessageChannel<P extends ChannelPayload>
public static interface MessageChannel.Sender<P extends ChannelPayload>
A target-bound sender for dispatching payloads.
-
Method Summary
Modifier and TypeMethodDescriptionSends a request and waits for a response with the default timeout.Sends a request and waits for a response with a custom timeout.default MessageChannel.Sender<P> default MessageChannel.Sender<P> requirePlayer(UUID player) Sends a payload without expecting a response.default MessageChannel.Sender<P> default MessageChannel.Sender<P> whenOnline(UUID player)
-
Method Details
-
send
Sends a payload without expecting a response.- Parameters:
payload- the data to send- Returns:
- a future that completes when the message is dispatched
-
request
Sends a request and waits for a response with the default timeout. Only supported for single-target senders.- Parameters:
payload- the request data- Returns:
- a future containing the response payload
-
request
Sends a request and waits for a response with a custom timeout. Only supported for single-target senders.- Parameters:
payload- the request datatimeout- the maximum time to wait for a response- Returns:
- a future containing the response payload
-
requirePlayer
-
requirePlayer
-
whenOnline
-
whenOnline
-