Class PingManager

    • Method Detail

      • ping

        public final AsyncResult<Boolean> ping​(Jid jid)
        Pings the given XMPP entity.
        Parameters:
        jid - The JID to ping.
        Returns:
        The async result with true if a response has been received within the timeout and the recipient is available, false otherwise.
      • pingServer

        public final AsyncResult<Boolean> pingServer()
        Pings the connected server.
        Returns:
        The async result with true if a response has been received, false otherwise.
      • getPingInterval

        public final Duration getPingInterval()
        Gets the ping interval. The default ping interval is 900 seconds (15 minutes).
        Returns:
        The ping interval in seconds.
        See Also:
        setPingInterval(Duration)
      • setPingInterval

        public final void setPingInterval​(Duration pingInterval)
        Sets the automatic ping interval. Any scheduled future ping is canceled and a new ping is scheduled after the specified interval.
        Parameters:
        pingInterval - The ping interval in seconds.
        See Also:
        getPingInterval()
      • getNamespace

        public final String getNamespace()
        Description copied from interface: ExtensionProtocol
        The protocol's main namespace. This is used to uniquely identify the extension protocol.
        Specified by:
        getNamespace in interface ExtensionProtocol
        Returns:
        The main namespace.