Package net.luckperms.api.messenger
Interface Messenger
- All Superinterfaces:
AutoCloseable
Represents an object which dispatches
OutgoingMessages.-
Method Summary
Modifier and TypeMethodDescriptiondefault voidclose()Performs the necessary action to gracefully shutdown the messenger.voidsendOutgoingMessage(@NonNull OutgoingMessage outgoingMessage) Performs the necessary action to dispatch the message using the means of the messenger.
-
Method Details
-
sendOutgoingMessage
Performs the necessary action to dispatch the message using the means of the messenger.The outgoing message instance is guaranteed to be an instance of one of the interfaces extending
Messagein the 'api.messenger.message.type' package.3rd party implementations are encouraged to implement this method with consideration that new types may be added in the future.
This call is always made async.
- Parameters:
outgoingMessage- the outgoing message
-
close
default void close()Performs the necessary action to gracefully shutdown the messenger.- Specified by:
closein interfaceAutoCloseable
-