public interface Messenger extends AutoCloseable
OutgoingMessages.| Modifier and Type | Method and Description |
|---|---|
default void |
close()
Performs the necessary action to gracefully shutdown the messenger.
|
void |
sendOutgoingMessage(@NonNull OutgoingMessage outgoingMessage)
Performs the necessary action to dispatch the message using the means
of the messenger.
|
void sendOutgoingMessage(@NonNull OutgoingMessage outgoingMessage)
The outgoing message instance is guaranteed to be an instance of one
of the interfaces extending Message in 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.
outgoingMessage - the outgoing messagedefault void close()
close in interface AutoCloseable