public final class PingManager extends ExtensionManager
For Server-To-Client Pings it automatically responds with a result (pong), in enabled.
It also allows to ping the server (Client-To-Server Pings) or to ping other XMPP entities (Client-to-Client Pings).
features, xmppSession| Modifier and Type | Method and Description |
|---|---|
long |
getPingInterval()
Gets the ping interval in seconds.
|
void |
ping(rocks.xmpp.core.Jid jid)
Pings the given XMPP entity.
|
void |
pingServer()
Pings the connected server.
|
void |
setEnabled(boolean enabled) |
void |
setPingInterval(long pingInterval)
Sets the automatic ping interval in seconds.
|
public void ping(rocks.xmpp.core.Jid jid)
throws rocks.xmpp.core.XmppException
jid - The JID to ping.rocks.xmpp.core.stanza.model.StanzaException - If the entity returned a stanza error.NoResponseException - If the entity did not respond.rocks.xmpp.core.XmppExceptionpublic void pingServer()
throws rocks.xmpp.core.XmppException
rocks.xmpp.core.stanza.model.StanzaException - If the entity returned a stanza error.NoResponseException - If the entity did not respond.rocks.xmpp.core.XmppExceptionpublic long getPingInterval()
setPingInterval(long)public void setPingInterval(long pingInterval)
pingInterval - The ping interval in seconds.getPingInterval()public void setEnabled(boolean enabled)
setEnabled in class ExtensionManagerCopyright © 2014 XMPP.rocks. All rights reserved.