public interface RTopicReactive
Modifier and Type | Method and Description |
---|---|
<M> reactor.core.publisher.Mono<Integer> |
addListener(Class<M> type,
MessageListener<M> listener)
Subscribes to this topic.
|
reactor.core.publisher.Mono<Integer> |
addListener(StatusListener listener)
Subscribes to status changes of this topic
|
reactor.core.publisher.Mono<Long> |
countSubscribers()
Returns amount of subscribers to this topic across all Redisson instances.
|
List<String> |
getChannelNames()
Get topic channel names
|
<M> reactor.core.publisher.Flux<M> |
getMessages(Class<M> type)
Returns continues stream of messages.
|
reactor.core.publisher.Mono<Long> |
publish(Object message)
Publish the message to all subscribers of this topic asynchronously
|
reactor.core.publisher.Mono<Void> |
removeListener(Integer... listenerIds)
Removes the listener by
id for listening this topic |
reactor.core.publisher.Mono<Void> |
removeListener(MessageListener<?> listener)
Removes the listener by
instance for listening this topic |
reactor.core.publisher.Mono<Long> publish(Object message)
message
- to sendFuture
object with number of clients that received the messagereactor.core.publisher.Mono<Integer> addListener(StatusListener listener)
listener
- for messagesStatusListener
<M> reactor.core.publisher.Mono<Integer> addListener(Class<M> type, MessageListener<M> listener)
MessageListener.onMessage
is called when any message
is published on this topic.M
- type of messagetype
- - type of messagelistener
- for messagesMessageListener
reactor.core.publisher.Mono<Void> removeListener(Integer... listenerIds)
id
for listening this topiclistenerIds
- - message listener idsreactor.core.publisher.Mono<Void> removeListener(MessageListener<?> listener)
instance
for listening this topiclistener
- - message listener<M> reactor.core.publisher.Flux<M> getMessages(Class<M> type)
M
- type of messagetype
- - type of message to listenreactor.core.publisher.Mono<Long> countSubscribers()
Copyright © 2014–2020 Redisson. All rights reserved.