org.jivesoftware.smackx.jingle.nat
Class FixedResolver

java.lang.Object
  extended by org.jivesoftware.smackx.jingle.nat.TransportResolver
      extended by org.jivesoftware.smackx.jingle.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.

Author:
Alvaro Saurin

Nested Class Summary
 
Nested classes/interfaces inherited from class org.jivesoftware.smackx.jingle.nat.TransportResolver
TransportResolver.Type
 
Field Summary
 
Fields inherited from class org.jivesoftware.smackx.jingle.nat.TransportResolver
CHECK_TIMEOUT, type
 
Constructor Summary
FixedResolver(java.lang.String ip, int port)
          Constructor.
 
Method Summary
 void cancel()
          Cancel any asynchronous resolution operation.
 void initialize()
          Initialize the resolver.
 void resolve(JingleSession session)
          Resolve the IP address.
 void setFixedCandidate(java.lang.String ip, int port)
          Create a basic resolver, where we provide the IP and port.
 
Methods inherited from class org.jivesoftware.smackx.jingle.nat.TransportResolver
addListener, clear, getCandidate, getCandidateCount, getCandidates, getCandidatesList, getListenersList, getPreferredCandidate, getType, initializeAndWait, isInitialized, isResolved, isResolving, removeListener, setInitialized, setType
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FixedResolver

public FixedResolver(java.lang.String ip,
                     int port)
Constructor.

Method Detail

setFixedCandidate

public void setFixedCandidate(java.lang.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 XMPPException
Resolve the IP address.

Specified by:
resolve in class TransportResolver
Throws:
XMPPException

initialize

public void initialize()
                throws XMPPException
Initialize the resolver.

Specified by:
initialize in class TransportResolver
Throws:
XMPPException

cancel

public void cancel()
            throws XMPPException
Description copied from class: TransportResolver
Cancel any asynchronous resolution operation.

Specified by:
cancel in class TransportResolver
Throws:
XMPPException