M - the message typepublic interface SubscribableMessageSource<M extends Message<?>>
messages to which message processors can subscribe.| Modifier and Type | Method and Description |
|---|---|
Registration |
subscribe(Consumer<List<? extends M>> messageProcessor)
Subscribe the given
messageProcessor to this message source. |
Registration subscribe(@Nonnull Consumer<List<? extends M>> messageProcessor)
messageProcessor to this message source. When subscribed, it will receive all
messages published to this source.
If the given messageProcessor is already subscribed, nothing happens.
messageProcessor - The message processor to subscribemessageProcessor. When unsubscribed it will no longer receive
messages.Copyright © 2010–2023. All rights reserved.