public interface RTopicRx
Modifier and Type | Method and Description |
---|---|
<M> io.reactivex.rxjava3.core.Single<Integer> |
addListener(Class<M> type,
MessageListener<M> listener)
Subscribes to this topic.
|
io.reactivex.rxjava3.core.Single<Integer> |
addListener(StatusListener listener)
Subscribes to status changes of this topic
|
io.reactivex.rxjava3.core.Single<Long> |
countSubscribers()
Returns amount of subscribers to this topic across all Redisson instances.
|
List<String> |
getChannelNames()
Get topic channel names
|
<M> io.reactivex.rxjava3.core.Flowable<M> |
getMessages(Class<M> type)
Returns continues stream of published messages.
|
io.reactivex.rxjava3.core.Single<Long> |
publish(Object message)
Publish the message to all subscribers of this topic asynchronously
|
io.reactivex.rxjava3.core.Completable |
removeListener(Integer... listenerIds)
Removes the listener by
id for listening this topic |
io.reactivex.rxjava3.core.Completable |
removeListener(MessageListener<?> listener)
Removes the listener by
instance for listening this topic |
io.reactivex.rxjava3.core.Single<Long> publish(Object message)
message
- to sendFuture
object with number of clients that received the messageio.reactivex.rxjava3.core.Single<Integer> addListener(StatusListener listener)
listener
- for messagesStatusListener
<M> io.reactivex.rxjava3.core.Single<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
io.reactivex.rxjava3.core.Completable removeListener(Integer... listenerIds)
id
for listening this topiclistenerIds
- - message listener idsio.reactivex.rxjava3.core.Completable removeListener(MessageListener<?> listener)
instance
for listening this topiclistener
- - message listener<M> io.reactivex.rxjava3.core.Flowable<M> getMessages(Class<M> type)
M
- - type of messagetype
- - type of message to listenio.reactivex.rxjava3.core.Single<Long> countSubscribers()
Copyright © 2014–2021 Redisson. All rights reserved.