Class BasicResolver
- java.lang.Object
-
- org.jivesoftware.smackx.jingleold.nat.TransportResolver
-
- org.jivesoftware.smackx.jingleold.nat.BasicResolver
-
public class BasicResolver extends TransportResolver
Basic Resolver takes all IP addresses of the interfaces and uses the first non-loopback address. A very simple and easy to use resolver.
-
-
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 BasicResolver()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.-
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
-
-
-
-
Method Detail
-
resolve
public void resolve(JingleSession session) throws org.jivesoftware.smack.XMPPException, org.jivesoftware.smack.SmackException.NotConnectedException, java.lang.InterruptedException
Resolve the IP address. The BasicResolver takes the IP addresses of the interfaces and uses the first non-loopback, non-linklocal and non-sitelocal address.- Specified by:
resolvein classTransportResolver- Parameters:
session- the Jingle session.- Throws:
org.jivesoftware.smack.SmackException.NotConnectedException- if the XMPP connection is not connected.java.lang.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.XMPPExceptionDescription copied from class:TransportResolverInitialize the Resolver.- Specified by:
initializein classTransportResolver- Throws:
org.jivesoftware.smack.XMPPException- if an XMPP protocol error was received.
-
cancel
public void cancel() throws org.jivesoftware.smack.XMPPExceptionDescription copied from class:TransportResolverCancel any asynchronous resolution operation.- Specified by:
cancelin classTransportResolver- Throws:
org.jivesoftware.smack.XMPPException- if an XMPP protocol error was received.
-
-