public abstract class TransportNegotiator extends JingleNegotiator
Modifier and Type | Class and Description |
---|---|
static class |
TransportNegotiator.Ice
Ice transport negotiator.
|
static class |
TransportNegotiator.RawUdp
Raw-UDP transport negotiator.
|
Modifier and Type | Field and Description |
---|---|
static int |
CANDIDATES_ACCEPT_PERIOD |
session
Constructor and Description |
---|
TransportNegotiator(JingleSession session,
TransportResolver transResolver,
ContentNegotiator parentNegotiator)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
abstract boolean |
acceptableTransportCandidate(TransportCandidate tc,
List<TransportCandidate> localCandidates)
Return true if the transport candidate is acceptable for the current
negotiator.
|
void |
close()
Called from above to session-terminate.
|
List<IQ> |
dispatchIncomingPacket(IQ iq,
String id)
Dispatch an incoming packet.
|
protected void |
doStart()
Called from above to start the negotiator during a session-initiate.
|
TransportCandidate |
getAcceptedLocalCandidate()
Get the best accepted local candidate we have offered.
|
TransportCandidate |
getBestLocalCandidate()
Obtain the best local candidate we want to offer.
|
abstract TransportCandidate |
getBestRemoteCandidate()
Obtain the best common transport candidate obtained in the negotiation.
|
JingleTransport |
getJingleTransport()
Return a JingleTransport that best reflects this transport negotiator.
|
abstract JingleTransport |
getJingleTransport(TransportCandidate cand)
Get a new instance of the right TransportNegotiator class with this
candidate.
|
List<TransportCandidate> |
getOfferedCandidates() |
Iterator<TransportCandidate> |
getValidRemoteCandidates()
Get an iterator for the list of valid (ie, checked) remote candidates.
|
boolean |
isFullyEstablished()
Return true if the transport is fully established.
|
addExpectedId, addListener, getConnection, getListenersList, getNegotiatorState, getSession, isExpectedId, isStarted, removeExpectedId, removeListener, setNegotiatorState, setSession, start
public static final int CANDIDATES_ACCEPT_PERIOD
public TransportNegotiator(JingleSession session, TransportResolver transResolver, ContentNegotiator parentNegotiator)
session
- The Jingle sessiontransResolver
- The JingleTransportManager to usepublic abstract JingleTransport getJingleTransport(TransportCandidate cand)
public abstract boolean acceptableTransportCandidate(TransportCandidate tc, List<TransportCandidate> localCandidates)
public final TransportCandidate getBestLocalCandidate()
public TransportCandidate getAcceptedLocalCandidate()
protected void doStart()
doStart
in class JingleNegotiator
public void close()
close
in class JingleNegotiator
public JingleTransport getJingleTransport()
public List<TransportCandidate> getOfferedCandidates()
public abstract TransportCandidate getBestRemoteCandidate()
public final boolean isFullyEstablished()
public final Iterator<TransportCandidate> getValidRemoteCandidates()
public final List<IQ> dispatchIncomingPacket(IQ iq, String id) throws XMPPException, SmackException, InterruptedException
dispatchIncomingPacket
in class JingleNegotiator
iq
- the stanza receivedid
- the ID of the response that will be sentXMPPException
SmackException
InterruptedException