src/net/java/sip/communicator/impl/protocol/jabber/CallJabberImpl.java
/**
     * Initializes a <tt>ColibriStreamConnector</tt> on behalf of a specific
     * <tt>CallPeer</tt> to be used in association with a specific
     * <tt>ColibriConferenceIQ.Channel</tt> of a specific <tt>MediaType</tt>.
     *
     * @param peer the <tt>CallPeer</tt> which requests the initialization of a
     * <tt>ColibriStreamConnector</tt>
     * @param mediaType the <tt>MediaType</tt> of the stream which is to use the
     * initialized <tt>ColibriStreamConnector</tt> for RTP and RTCP traffic
     * @param channel the <tt>ColibriConferenceIQ.Channel</tt> to which RTP and
     * RTCP traffic is to be sent and from which such traffic is to be received
     * via the initialized <tt>ColibriStreamConnector</tt>
     * @param factory a <tt>StreamConnectorFactory</tt> implementation which is
     * to allocate the sockets to be used for RTP and RTCP traffic
     * @return a <tt>ColibriStreamConnector</tt> to be used for RTP and RTCP
     * traffic associated with the specified <tt>channel</tt>
     */
Initializes a ColibriStreamConnector on behalf of a specific
CallPeer to be used in association with a specific
ColibriConferenceIQ.Channel of a specific MediaType.


Initializes a ColibriStreamConnector on behalf of a specific CallPeer to be used in association with a specific ColibriConferenceIQ . Channel of a specific MediaType .
public ColibriStreamConnector createColibriStreamConnector(
                CallPeerJabberImpl peer,
                MediaType mediaType,
                ColibriConferenceIQ.Channel channel,
                StreamConnectorFactory factory)
    {
        String channelID = channel.getID();
        if (channelID == null)
            throw new IllegalArgumentException("channel");
        if (colibri == null)
            throw new IllegalStateException("colibri");
        ColibriConferenceIQ.Content content
            = colibri.getContent(mediaType.toString());
        if (content == null)
            throw new IllegalArgumentException("mediaType");
        if ((content.getChannelCount() < 1)
                || !channelID.equals((channel = content.getChannel(0)).getID()))
            throw new IllegalArgumentException("channel");
        ColibriStreamConnector colibriStreamConnector;
        synchronized (colibriStreamConnectors)
        {
            int index = mediaType.ordinal();
            WeakReference<ColibriStreamConnector> weakReference
                = colibriStreamConnectors.get(index);
            colibriStreamConnector
                = (weakReference == null) ? null : weakReference.get();
            if (colibriStreamConnector == null)
            {
                StreamConnector streamConnector
                    = factory.createStreamConnector();
                if (streamConnector != null)
                {
                    colibriStreamConnector
                        = new ColibriStreamConnector(streamConnector);
                    colibriStreamConnectors.set(
                        index,
                        new WeakReference<ColibriStreamConnector>(
                            colibriStreamConnector));
                }
            }
        }
        return colibriStreamConnector;
    }
public ColibriStreamConnector createColibriStreamConnector ( CallPeerJabberImpl peer , MediaType mediaType , ColibriConferenceIQ . Channel channel , StreamConnectorFactory factory ) { String channelID = channel . getID ( ) ; if ( channelID == null ) throw new IllegalArgumentException ( "channel" ) ; if ( colibri == null ) throw new IllegalStateException ( "colibri" ) ; ColibriConferenceIQ . Content content = colibri . getContent ( mediaType . toString ( ) ) ; if ( content == null ) throw new IllegalArgumentException ( "mediaType" ) ; if ( ( content . getChannelCount ( ) < 1 ) || ! channelID . equals ( ( channel = content . getChannel ( 0 ) ) . getID ( ) ) ) throw new IllegalArgumentException ( "channel" ) ; ColibriStreamConnector colibriStreamConnector ; synchronized ( colibriStreamConnectors ) { int index = mediaType . ordinal ( ) ; WeakReference < ColibriStreamConnector > weakReference = colibriStreamConnectors . get ( index ) ; colibriStreamConnector = ( weakReference == null ) ? null : weakReference . get ( ) ; if ( colibriStreamConnector == null ) { StreamConnector streamConnector = factory . createStreamConnector ( ) ; if ( streamConnector != null ) { colibriStreamConnector = new ColibriStreamConnector ( streamConnector ) ; colibriStreamConnectors . set ( index , new WeakReference < ColibriStreamConnector > ( colibriStreamConnector ) ) ; } } } return colibriStreamConnector ; }
Initializes a <tt>ColibriStreamConnector</tt> on behalf of a specific
 <tt>CallPeer</tt> to be used in association with a specific
 <tt>ColibriConferenceIQ.Channel</tt> of a specific <tt>MediaType</tt>.
Initializes a <tt > ColibriStreamConnector< / tt > on behalf of a specific <tt > CallPeer< / tt > to be used in association with a specific <tt > ColibriConferenceIQ . Channel< / tt > of a specific <tt > MediaType< / tt > .