src/net/java/sip/communicator/impl/protocol/jabber/TransportManagerJabberImpl.java
/**
     * Closes a specific <tt>StreamConnector</tt> associated with a specific
     * <tt>MediaType</tt>. If this <tt>TransportManager</tt> has a reference to
     * the specified <tt>streamConnector</tt>, it remains.
     * Also expires the <tt>ColibriConferenceIQ.Channel</tt> associated with
     * the closed <tt>StreamConnector</tt>.
     *
     * @param mediaType the <tt>MediaType</tt> associated with the specified
     * <tt>streamConnector</tt>
     * @param streamConnector the <tt>StreamConnector</tt> to be closed
     */
Closes a specific StreamConnector associated with a specific
MediaType. If this TransportManager has a reference to
the specified streamConnector, it remains.
Also expires the ColibriConferenceIQ.Channel associated with
the closed StreamConnector.

@param mediaType the MediaType associated with the specified
streamConnector
@param streamConnector the StreamConnector to be closed
Closes a specific StreamConnector associated with a specific MediaType . If this TransportManager has a reference to the specified streamConnector it remains . Also expires the ColibriConferenceIQ . Channel associated with the closed StreamConnector . @param mediaType the MediaType associated with the specified streamConnector @param streamConnector the StreamConnector to be closed
@Override
    protected void closeStreamConnector(
            MediaType mediaType,
            StreamConnector streamConnector)
        throws OperationFailedException
    {
        try
        {
            boolean superCloseStreamConnector = true;
            if (streamConnector instanceof ColibriStreamConnector)
            {
                CallPeerJabberImpl peer = getCallPeer();
                if (peer != null)
                {
                    CallJabberImpl call = peer.getCall();
                    if (call != null)
                    {
                        superCloseStreamConnector = false;
                        call.closeColibriStreamConnector(
                            peer,
                            mediaType,
                            (ColibriStreamConnector) streamConnector);
                    }
                }
            }
            if (superCloseStreamConnector)
                super.closeStreamConnector(mediaType, streamConnector);
        }
        finally
        {
            /*
             * Expire the ColibriConferenceIQ.Channel associated with the closed
             * StreamConnector.
             */
            if (colibri != null)
            {
                ColibriConferenceIQ.Content content
                    = colibri.getContent(mediaType.toString());
                if (content != null)
                {
                    List<ColibriConferenceIQ.Channel> channels
                        = content.getChannels();
                    if (channels.size() == 2)
                    {
                        ColibriConferenceIQ requestConferenceIQ
                            = new ColibriConferenceIQ();
                        requestConferenceIQ.setID(colibri.getID());
                        ColibriConferenceIQ.Content requestContent
                            = requestConferenceIQ.getOrCreateContent(
                                    content.getName());
                        requestContent.addChannel(channels.get(1 /* remote */));
                        /*
                         * Regardless of whether the request to expire the
                         * Channel associated with mediaType succeeds, consider
                         * the Channel in question expired. Since
                         * RawUdpTransportManager allocates a single channel per
                         * MediaType, consider the whole Content expired.
                         */
                        colibri.removeContent(content);
                        CallPeerJabberImpl peer = getCallPeer();
                        if (peer != null)
                        {
                            CallJabberImpl call = peer.getCall();
                            if (call != null)
                            {
                                try
                                {
                                    call.expireColibriChannels(
                                            peer,
                                            requestConferenceIQ);
                                }
                                catch (NotConnectedException | InterruptedException e)
                                {
                                    throw new OperationFailedException(
                                        "Could not expire colibri channels",
                                        OperationFailedException.GENERAL_ERROR,
                                        e
                                    );
                                }
                            }
                        }
                    }
                }
            }
        }
    }
@ Override protected void closeStreamConnector ( MediaType mediaType , StreamConnector streamConnector ) throws OperationFailedException { try { boolean superCloseStreamConnector = true ; if ( streamConnector instanceof ColibriStreamConnector ) { CallPeerJabberImpl peer = getCallPeer ( ) ; if ( peer != null ) { CallJabberImpl call = peer . getCall ( ) ; if ( call != null ) { superCloseStreamConnector = false ; call . closeColibriStreamConnector ( peer , mediaType , ( ColibriStreamConnector ) streamConnector ) ; } } } if ( superCloseStreamConnector ) super . closeStreamConnector ( mediaType , streamConnector ) ; } finally { /*
             * Expire the ColibriConferenceIQ.Channel associated with the closed
             * StreamConnector.
             */ if ( colibri != null ) { ColibriConferenceIQ . Content content = colibri . getContent ( mediaType . toString ( ) ) ; if ( content != null ) { List < ColibriConferenceIQ . Channel > channels = content . getChannels ( ) ; if ( channels . size ( ) == 2 ) { ColibriConferenceIQ requestConferenceIQ = new ColibriConferenceIQ ( ) ; requestConferenceIQ . setID ( colibri . getID ( ) ) ; ColibriConferenceIQ . Content requestContent = requestConferenceIQ . getOrCreateContent ( content . getName ( ) ) ; requestContent . addChannel ( channels . get ( 1 /* remote */ ) ) ; /*
                         * Regardless of whether the request to expire the
                         * Channel associated with mediaType succeeds, consider
                         * the Channel in question expired. Since
                         * RawUdpTransportManager allocates a single channel per
                         * MediaType, consider the whole Content expired.
                         */ colibri . removeContent ( content ) ; CallPeerJabberImpl peer = getCallPeer ( ) ; if ( peer != null ) { CallJabberImpl call = peer . getCall ( ) ; if ( call != null ) { try { call . expireColibriChannels ( peer , requestConferenceIQ ) ; } catch ( NotConnectedException | InterruptedException e ) { throw new OperationFailedException ( "Could not expire colibri channels" , OperationFailedException . GENERAL_ERROR , e ) ; } } } } } } } }
Closes a specific <tt>StreamConnector</tt> associated with a specific
 <tt>MediaType</tt>.
Closes a specific <tt > StreamConnector< / tt > associated with a specific <tt > MediaType< / tt > .