public final class ReachabilityManager extends Manager
Allows to query for reachability addresses of another contact, automatically responds to reachability queries and notifies Consumers, when the reachability of a contact has changed either via presence or PEP.
By default this manager is not enabled. If you support reachability addresses you have to enable it.
Modifier and Type | Method and Description |
---|---|
void |
addReachabilityListener(java.util.function.Consumer<ReachabilityEvent> reachabilityListener)
Adds a reachability listener, which allows to listen for reachability updates.
|
java.util.List<Address> |
getReachabilityAddresses() |
void |
removeReachabilityListener(java.util.function.Consumer<ReachabilityEvent> reachabilityListener)
Removes a previously added reachability listener.
|
AsyncResult<java.util.List<Address>> |
requestReachabilityAddresses(Jid contact)
Requests the reachability addresses of a contact.
|
isEnabled, setEnabled
public java.util.List<Address> getReachabilityAddresses()
public void addReachabilityListener(java.util.function.Consumer<ReachabilityEvent> reachabilityListener)
Adds a reachability listener, which allows to listen for reachability updates.
reachabilityListener
- The listener.removeReachabilityListener(Consumer)
public void removeReachabilityListener(java.util.function.Consumer<ReachabilityEvent> reachabilityListener)
Removes a previously added reachability listener.
reachabilityListener
- The listener.addReachabilityListener(Consumer)
public AsyncResult<java.util.List<Address>> requestReachabilityAddresses(Jid contact)
Requests the reachability addresses of a contact.
contact
- The contact.Copyright © 2014–2019 XMPP.rocks. All rights reserved.