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.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.jivesoftware.smackx.jingleold.nat.TransportResolver
TransportResolver.Type
-
-
Field Summary
-
Fields inherited from class org.jivesoftware.smackx.jingleold.nat.TransportResolver
candidates, CHECK_TIMEOUT, type
-
-
Constructor Summary
Constructors Constructor Description FixedResolver(java.lang.String ip, int port)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcancel()Cancel any asynchronous resolution operation.voidinitialize()Initialize the resolver.voidresolve(JingleSession session)Resolve the IP address.voidsetFixedCandidate(java.lang.String ip, int port)Create a basic resolver, where we provide the IP and port.-
Methods inherited from class org.jivesoftware.smackx.jingleold.nat.TransportResolver
addCandidate, addListener, clear, clearCandidates, getCandidate, getCandidateCount, getCandidates, getCandidatesList, getFreePort, getListenersList, getPreferredCandidate, getType, initializeAndWait, isInitialized, isResolved, isResolving, removeListener, setInitialized, setResolveEnd, setResolveInit, setType, triggerCandidateAdded
-
-
-
-
Constructor Detail
-
FixedResolver
public FixedResolver(java.lang.String ip, int port)
Constructor.- Parameters:
ip- the IP address.port- the port number.
-
-
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 addressport- a port
-
resolve
public void resolve(JingleSession session) throws XMPPException, SmackException.NotConnectedException, java.lang.InterruptedException
Resolve the IP address.- Specified by:
resolvein classTransportResolver- Parameters:
session- the Jingle session.- Throws:
SmackException.NotConnectedException- if the XMPP connection is not connected.java.lang.InterruptedException- if the calling thread was interrupted.XMPPException- if an XMPP protocol error was received.
-
initialize
public void initialize() throws XMPPException
Initialize the resolver.- Specified by:
initializein classTransportResolver- Throws:
XMPPException- if an XMPP protocol error was received.
-
cancel
public void cancel() throws XMPPException
Description copied from class:TransportResolverCancel any asynchronous resolution operation.- Specified by:
cancelin classTransportResolver- Throws:
XMPPException- if an XMPP protocol error was received.
-
-