Class FixedResolver

java.lang.Object
org.jivesoftware.smackx.jingleold.nat.TransportResolver
org.jivesoftware.smackx.jingleold.nat.FixedResolver

public class FixedResolver extends TransportResolver
The FixedResolver is a resolver where the external address and port are previously known when the object is initialized.
  • Constructor Details

    • FixedResolver

      public FixedResolver(String ip, int port)
      Constructor.
      Parameters:
      ip - the IP address.
      port - the port number.
  • Method Details

    • setFixedCandidate

      public void setFixedCandidate(String ip, int port)
      Create a basic resolver, where we provide the IP and port.
      Parameters:
      ip - an IP address
      port - a port
    • resolve

      public void resolve(JingleSession session) throws org.jivesoftware.smack.XMPPException, org.jivesoftware.smack.SmackException.NotConnectedException, InterruptedException
      Resolve the IP address.
      Specified by:
      resolve in class TransportResolver
      Parameters:
      session - the Jingle session.
      Throws:
      org.jivesoftware.smack.SmackException.NotConnectedException - if the XMPP connection is not connected.
      InterruptedException - if the calling thread was interrupted.
      org.jivesoftware.smack.XMPPException - if an XMPP protocol error was received.
    • initialize

      public void initialize() throws org.jivesoftware.smack.XMPPException
      Initialize the resolver.
      Specified by:
      initialize in class TransportResolver
      Throws:
      org.jivesoftware.smack.XMPPException - if an XMPP protocol error was received.
    • cancel

      public void cancel() throws org.jivesoftware.smack.XMPPException
      Description copied from class: TransportResolver
      Cancel any asynchronous resolution operation.
      Specified by:
      cancel in class TransportResolver
      Throws:
      org.jivesoftware.smack.XMPPException - if an XMPP protocol error was received.