Class BasicResolver
java.lang.Object
org.jivesoftware.smackx.jingleold.nat.TransportResolver
org.jivesoftware.smackx.jingleold.nat.BasicResolver
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 TransportResolver
TransportResolver.Type -
Field Summary
Fields inherited from class TransportResolver
candidates, CHECK_TIMEOUT, type -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcancel()Cancel any asynchronous resolution operation.voidInitialize the Resolver.voidresolve(JingleSession session) Resolve the IP address.Methods inherited from class TransportResolver
addCandidate, addListener, clear, clearCandidates, getCandidate, getCandidateCount, getCandidates, getCandidatesList, getFreePort, getListenersList, getPreferredCandidate, getType, initializeAndWait, isInitialized, isResolved, isResolving, removeListener, setInitialized, setResolveEnd, setResolveInit, setType, triggerCandidateAdded
-
Constructor Details
-
BasicResolver
public BasicResolver()Constructor.
-
-
Method Details
-
resolve
public void resolve(JingleSession session) throws XMPPException, SmackException.NotConnectedException, 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:
SmackException.NotConnectedException- if the XMPP connection is not connected.InterruptedException- if the calling thread was interrupted.XMPPException- if an XMPP protocol error was received.
-
initialize
Description copied from class:TransportResolverInitialize the Resolver.- Specified by:
initializein classTransportResolver- Throws:
XMPPException- if an XMPP protocol error was received.
-
cancel
Description copied from class:TransportResolverCancel any asynchronous resolution operation.- Specified by:
cancelin classTransportResolver- Throws:
XMPPException- if an XMPP protocol error was received.
-