Class JingleTransportManager
java.lang.Object
org.jivesoftware.smackx.jingleold.nat.JingleTransportManager
- Direct Known Subclasses:
BasicTransportManager
,BridgedTransportManager
,FixedTransportManager
,ICETransportManager
,STUNTransportManager
Transport manager for Jingle.
This class makes easier the use of transport resolvers by presenting a simple
interface for algorithm selection. The transport manager also keeps the match
between the resolution method and the <transport> element present in
Jingle packets.
As Jingle have many transport methods (official and unofficial methods),
this abstract class helps us to extends the transport support of the API.
This class must be used with a JingleManager instance in the following way:
JingleManager jingleManager = new JingleManager(xmppConnection, new BasicTransportManager());
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract TransportResolver
createResolver
(JingleSession session) Create a Transport Resolver instance according to the implementation.getResolver
(JingleSession session) Get a new Transport Resolver to be used in a Jingle Session.
-
Constructor Details
-
JingleTransportManager
public JingleTransportManager()Default constructor.
-
-
Method Details
-
getResolver
public TransportResolver getResolver(JingleSession session) throws XMPPException, SmackException, InterruptedException Get a new Transport Resolver to be used in a Jingle Session.- Parameters:
session
- the jingle session.- Returns:
- the TransportResolver to be used
- Throws:
XMPPException
- if an XMPP protocol error was received.SmackException
- if Smack detected an exceptional situation.InterruptedException
- if the calling thread was interrupted.
-
createResolver
protected abstract TransportResolver createResolver(JingleSession session) throws SmackException, InterruptedException Create a Transport Resolver instance according to the implementation.- Parameters:
session
- the jingle session.- Returns:
- the TransportResolver
- Throws:
SmackException
- if Smack detected an exceptional situation.InterruptedException
- if the calling thread was interrupted.
-