Class TransportNegotiator

    • Method Detail

      • getJingleTransport

        public abstract JingleTransport getJingleTransport​(TransportCandidate cand)
        Get a new instance of the right TransportNegotiator class with this candidate.
        Parameters:
        cand - the transport candidate.
        Returns:
        A TransportNegotiator instance
      • acceptableTransportCandidate

        public abstract boolean acceptableTransportCandidate​(TransportCandidate tc,
                                                             java.util.List<TransportCandidate> localCandidates)
        Return true if the transport candidate is acceptable for the current negotiator.
        Parameters:
        tc - the transport candidate.
        localCandidates - a list of local transport candidates.
        Returns:
        true if the transport candidate is acceptable
      • doStart

        protected void doStart()
        Called from above to start the negotiator during a session-initiate.
        Specified by:
        doStart in class JingleNegotiator
      • getJingleTransport

        public JingleTransport getJingleTransport()
        Return a JingleTransport that best reflects this transport negotiator.
        Returns:
        the jingle transport.
      • isFullyEstablished

        public final boolean isFullyEstablished()
        Return true if the transport is fully established.
        Returns:
        true if the transport is fully established.
      • getValidRemoteCandidates

        public final java.util.Iterator<TransportCandidategetValidRemoteCandidates()
        Get an iterator for the list of valid (ie, checked) remote candidates.
        Returns:
        The iterator for the list of valid (ie, already checked) remote candidates.
      • dispatchIncomingPacket

        public final java.util.List<IQdispatchIncomingPacket​(IQ iq,
                                                               java.lang.String id)
                                                        throws XMPPException,
                                                               SmackException,
                                                               java.lang.InterruptedException
        Dispatch an incoming packet. The method is responsible for recognizing the stanza type and, depending on the current state, delivering the stanza to the right event handler and wait for a response.
        Specified by:
        dispatchIncomingPacket in class JingleNegotiator
        Parameters:
        iq - the stanza received
        id - the ID of the response that will be sent
        Returns:
        the new Jingle stanza to send.
        Throws:
        XMPPException - if an XMPP protocol error was received.
        SmackException - if Smack detected an exceptional situation.
        java.lang.InterruptedException - if the calling thread was interrupted.