Class ICEResolver
- java.lang.Object
-
- org.jivesoftware.smackx.jingleold.nat.TransportResolver
-
- org.jivesoftware.smackx.jingleold.nat.ICEResolver
-
public class ICEResolver extends TransportResolver
ICE Resolver for Jingle transport method that results in sending data between two entities using the Interactive Connectivity Establishment (ICE) methodology. (XEP-0176) The goal of this resolver is to make possible to establish and manage out-of-band connections between two XMPP entities, even if they are behind Network Address Translators (NATs) or firewalls. To use this resolver you must have a STUN Server and be in a non STUN blocked network. Or use an XMPP server with public IP detection Service.
-
-
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 ICEResolver(XMPPConnection connection, String server, int port)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cancel()
Cancel any asynchronous resolution operation.void
initialize()
Initialize the Resolver.void
resolve(JingleSession session)
Resolve the IP and obtain a valid transport method.-
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
-
ICEResolver
public ICEResolver(XMPPConnection connection, String server, int port)
-
-
Method Detail
-
initialize
public void initialize() throws XMPPException
Description copied from class:TransportResolver
Initialize the Resolver.- Specified by:
initialize
in classTransportResolver
- Throws:
XMPPException
- if an XMPP protocol error was received.
-
cancel
public void cancel() throws XMPPException
Description copied from class:TransportResolver
Cancel any asynchronous resolution operation.- Specified by:
cancel
in classTransportResolver
- Throws:
XMPPException
- if an XMPP protocol error was received.
-
resolve
public void resolve(JingleSession session) throws XMPPException, SmackException, InterruptedException
Resolve the IP and obtain a valid transport method.- Specified by:
resolve
in classTransportResolver
- Parameters:
session
- the Jingle session.- Throws:
SmackException
- if Smack detected an exceptional situation.InterruptedException
- if the calling thread was interrupted.XMPPException
- if an XMPP protocol error was received.
-
-