Class Socks5ByteStreamManager

    • Method Detail

      • isLocalHostEnabled

        public boolean isLocalHostEnabled()
        Indicates whether the local host is enabled.
        Returns:
        If enabled.
      • setLocalHostEnabled

        public void setLocalHostEnabled​(boolean enabled)
        Enables or disables the use of a local SOCKS5 host.
        Parameters:
        enabled - If enabled.
      • getPort

        public int getPort()
        Gets the port of the local host.
        Returns:
        The port.
      • setPort

        public void setPort​(int port)
        Sets the port of the local host.
        Parameters:
        port - The port.
      • getAvailableStreamHosts

        public AsyncResult<List<StreamHost>> getAvailableStreamHosts()
        Gets a list of available stream hosts, including the discovered proxies and the local host.
        Returns:
        The async result with the stream hosts.
      • setStreamHost

        public void setStreamHost​(StreamHost streamHost)
        Configures a custom stream host. If a stream host is set this way, no stream hosts are discovered, but the configured one is used instead.
        Parameters:
        streamHost - The stream host.
      • getStreamHost

        public StreamHost getStreamHost()
        Gets the configured stream host.
        Returns:
        The configured stream host or null if none was configured.
      • 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.
      • handleRequest

        public final IQ handleRequest​(IQ iq)
        Description copied from interface: IQHandler
        Handles an inbound IQ stanza of type get or set.

        The returned IQ must be of type result or error. If null is returned, no response is returned to the requester and you must take responsibility of sending a response manually. However, this approach is not recommended.

        Use IQ.createResult() or IQ.createError(rocks.xmpp.core.stanza.model.StanzaError) to generate the response IQ (i.e. an IQ with the same id).

        Specified by:
        handleRequest in interface IQHandler
        Parameters:
        iq - The inbound IQ stanza.
        Returns:
        The result or error IQ, which is the response to sending entity.