Class JingleNegotiator

    • Method Detail

      • getSession

        public JingleSession getSession()
        Get the XMPP connection associated with this negotiation.
        Returns:
        the connection
      • setSession

        public void setSession​(JingleSession session)
        Set the XMPP connection associated.
        Parameters:
        session - the jingle session
      • addExpectedId

        public void addExpectedId​(String id)
        Add expected ID.
        Parameters:
        id - TODO javadoc me please
      • isExpectedId

        public boolean isExpectedId​(String id)
        Check if the passed ID is the expected ID.
        Parameters:
        id - TODO javadoc me please
        Returns:
        true if is expected id
      • removeExpectedId

        public void removeExpectedId​(String id)
        Remove and expected ID.
        Parameters:
        id - TODO javadoc me please
      • dispatchIncomingPacket

        public abstract List<IQdispatchIncomingPacket​(IQ iq,
                                                        String id)
                                                 throws XMPPException,
                                                        SmackException,
                                                        InterruptedException
        Dispatch an incoming packet. The negotiators form a tree relationship that roughly matches the Jingle stanza format: JingleSession Content Negotiator Media Negotiator Transport Negotiator Content Negotiator Media Negotiator Transport Negotiator <jingle> <content> <description> <transport> <content> <description> <transport> This way, each segment of a Jingle stanza has a corresponding negotiator that know how to deal with that part of the Jingle packet. It also allows us to support Jingle packets of arbitraty complexity. Each parent calls dispatchIncomingPacket for each of its children. The children then pass back a List of results that will get sent when we reach the top level negotiator (JingleSession).
        Parameters:
        iq - the stanza received
        id - the ID of the response that will be sent
        Returns:
        the new stanza to send (either a Jingle or an IQ error).
        Throws:
        XMPPException - if an XMPP protocol error was received.
        SmackException - if Smack detected an exceptional situation.
        InterruptedException - if the calling thread was interrupted.
      • start

        public void start()
      • doStart

        protected abstract void doStart()
        Each of the negotiators has their individual behavior when they start.
      • close

        public void close()
        Close the negotiation.