Package nu.fw.jeti.plugins.jingle.jingle.nat

Examples of nu.fw.jeti.plugins.jingle.jingle.nat.TransportCandidate


            if (isFullyEstablished()) {

                PayloadType.Audio bestCommonAudioPt = getMediaNeg()
                        .getBestCommonAudioPt();
                TransportCandidate bestRemoteCandidate = getTransportNeg()
                        .getBestRemoteCandidate();

                // Ok, send a packet saying that we accept this session
                // with the audio payload type and the transport
                // candidate
View Full Code Here


         * @throws XMPPException
         */
        public Jingle eventAccept(Jingle jin) throws XMPPException {

            PayloadType acceptedPayloadType = null;
            TransportCandidate acceptedLocalCandidate = null;

            // We process the "accepted" if we have finished the
            // sub-negotiators. Maybe this is not needed (ie, the other endpoint
            // can take the first valid transport candidate), but otherwise we
            // must cancel the negotiators...
            //
            if (isFullyEstablished()) {
                acceptedPayloadType = getAcceptedAudioPayloadType(jin);
                acceptedLocalCandidate = getAcceptedLocalCandidate(jin);

                if (acceptedPayloadType != null && acceptedLocalCandidate != null) {
                    if (acceptedPayloadType.equals(getMediaNeg().getBestCommonAudioPt())
                            && acceptedLocalCandidate.equals(getTransportNeg()
                            .getAcceptedLocalCandidate())) {
                        setState(active);
                    }
                }
                else {
View Full Code Here

         * @see org.jivesoftware.smackx.jingle.JingleNegotiator.State#eventEnter()
         */
        public void eventEnter() {
          //System.out.println("event enter established");
            PayloadType.Audio bestCommonAudioPt = getMediaNeg().getBestCommonAudioPt();
            TransportCandidate bestRemoteCandidate = getTransportNeg()
                    .getBestRemoteCandidate();
            TransportCandidate acceptedLocalCandidate = getTransportNeg()
                    .getAcceptedLocalCandidate();

            // Trigger the session established flag
            triggerSessionEstablished(bestCommonAudioPt, bestRemoteCandidate,
                    acceptedLocalCandidate);
View Full Code Here

        private void checkFullyEstablished() {
            if (isFullyEstablished()) {

                PayloadType.Audio bestCommonAudioPt = getMediaNeg()
                        .getBestCommonAudioPt();
                TransportCandidate bestRemoteCandidate = getTransportNeg()
                        .getBestRemoteCandidate();

                TransportCandidate acceptedLocalCandidate = getTransportNeg()
                        .getAcceptedLocalCandidate();

                if (bestCommonAudioPt != null && bestRemoteCandidate != null
                        && acceptedLocalCandidate != null) {
                    // Ok, send a packet saying that we accept this session
View Full Code Here

         * The other endpoint has accepted the session.
         */
        public Jingle eventAccept(Jingle jin) throws XMPPException {

            PayloadType acceptedPayloadType = null;
            TransportCandidate acceptedLocalCandidate = null;

            // We process the "accepted" if we have finished the
            // sub-negotiators. Maybe this is not needed (ie, the other endpoint
            // can take the first valid transport candidate), but otherwise we
            // must cancel the negotiators...
            //
            if (isFullyEstablished()) {
                acceptedPayloadType = getAcceptedAudioPayloadType(jin);
                acceptedLocalCandidate = getAcceptedLocalCandidate(jin);

                if (acceptedPayloadType != null && acceptedLocalCandidate != null) {
                    if (acceptedPayloadType.equals(getMediaNeg().getBestCommonAudioPt())
                            && acceptedLocalCandidate.equals(getTransportNeg()
                            .getAcceptedLocalCandidate())) {
                        setState(active);
                    }
                }
                else {
View Full Code Here

         *
         * @see org.jivesoftware.smackx.jingle.JingleNegotiator.State#eventEnter()
         */
        public void eventEnter() {
            PayloadType.Audio bestCommonAudioPt = getMediaNeg().getBestCommonAudioPt();
            TransportCandidate bestRemoteCandidate = getTransportNeg()
                    .getBestRemoteCandidate();
            TransportCandidate acceptedLocalCandidate = getTransportNeg()
                    .getAcceptedLocalCandidate();

            // Trigger the session established flag
            triggerSessionEstablished(bestCommonAudioPt, bestRemoteCandidate,
                    acceptedLocalCandidate);
View Full Code Here

     * @throws XMPPException
     */
    protected TransportCandidate getAcceptedLocalCandidate(Jingle jin)
            throws XMPPException {
        ArrayList jta = jin.getTransportsList();
        TransportCandidate acceptedLocalCandidate = null;

        if (jin.getAction().equals(Jingle.Action.SESSIONACCEPT)) {
            if (jta.size() > 1) {
                throw new XMPPException(
                        "Unsupported feature: the number of accepted transports is greater than 1.");
View Full Code Here

TOP

Related Classes of nu.fw.jeti.plugins.jingle.jingle.nat.TransportCandidate

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.