src/net/java/sip/communicator/service/protocol/CallConference.java
/**
     * Notifies this telephony conference about a specific
     * <tt>CallPeerEvent</tt> i.e. that a <tt>CallPeer</tt> was either added to
     * or removed from a <tt>Call</tt>.
     *
     * @param ev a <tt>CallPeerEvent</tt> which specifies the <tt>CallPeer</tt>
     * which was added or removed and the <tt>Call</tt> to which it was added or
     * from which is was removed
     */
Notifies this telephony conference about a specific
CallPeerEvent i.e. that a CallPeer was either added to
or removed from a Call.

@param ev a CallPeerEvent which specifies the CallPeer
which was added or removed and the Call to which it was added or
from which is was removed
Notifies this telephony conference about a specific CallPeerEvent i . e . that a CallPeer was either added to or removed from a Call . @param ev a CallPeerEvent which specifies the CallPeer which was added or removed and the Call to which it was added or from which is was removed
private void onCallPeerEvent(CallPeerEvent ev)
    {
        Call call = ev.getSourceCall();
        if (containsCall(call))
        {
            /*
             * Update the conferenceFocus state. Following the line of thinking
             * expressed in the callAdded and callRemoved methods, only update
             * it if the new conferenceFocus value is in accord with the
             * expectations.
             */
            int eventID = ev.getEventID();
            boolean conferenceFocus = isConferenceFocus(getCalls());
            switch (eventID)
            {
            case CallPeerEvent.CALL_PEER_ADDED:
                if (conferenceFocus)
                    setConferenceFocus(conferenceFocus);
                break;
            case CallPeerEvent.CALL_PEER_REMOVED:
                if (!conferenceFocus)
                    setConferenceFocus(conferenceFocus);
                break;
            default:
                /*
                 * We're interested in the adding and removing of CallPeers
                 * only.
                 */
                break;
            }
            try
            {
                for (CallChangeListener l : getCallChangeListeners())
                {
                    switch (eventID)
                    {
                    case CallPeerEvent.CALL_PEER_ADDED:
                        l.callPeerAdded(ev);
                        break;
                    case CallPeerEvent.CALL_PEER_REMOVED:
                        l.callPeerRemoved(ev);
                        break;
                    default:
                        break;
                    }
                }
            }
            finally
            {
                /*
                 * Add/remove the callPeerConferenceListener to/from the source
                 * CallPeer (for the purposes of the
                 * addCallPeerConferenceListener method of this CallConference).
                 */
                CallPeer callPeer = ev.getSourceCallPeer();
                switch (eventID)
                {
                case CallPeerEvent.CALL_PEER_ADDED:
                    callPeer.addCallPeerConferenceListener(
                            callPeerConferenceListener);
                    break;
                case CallPeerEvent.CALL_PEER_REMOVED:
                    callPeer.removeCallPeerConferenceListener(
                            callPeerConferenceListener);
                    break;
                default:
                    break;
                }
            }
        }
    }
private void onCallPeerEvent ( CallPeerEvent ev ) { Call call = ev . getSourceCall ( ) ; if ( containsCall ( call ) ) { /*
             * Update the conferenceFocus state. Following the line of thinking
             * expressed in the callAdded and callRemoved methods, only update
             * it if the new conferenceFocus value is in accord with the
             * expectations.
             */ int eventID = ev . getEventID ( ) ; boolean conferenceFocus = isConferenceFocus ( getCalls ( ) ) ; switch ( eventID ) { case CallPeerEvent . CALL_PEER_ADDED : if ( conferenceFocus ) setConferenceFocus ( conferenceFocus ) ; break ; case CallPeerEvent . CALL_PEER_REMOVED : if ( ! conferenceFocus ) setConferenceFocus ( conferenceFocus ) ; break ; default : /*
                 * We're interested in the adding and removing of CallPeers
                 * only.
                 */ break ; } try { for ( CallChangeListener l : getCallChangeListeners ( ) ) { switch ( eventID ) { case CallPeerEvent . CALL_PEER_ADDED : l . callPeerAdded ( ev ) ; break ; case CallPeerEvent . CALL_PEER_REMOVED : l . callPeerRemoved ( ev ) ; break ; default : break ; } } } finally { /*
                 * Add/remove the callPeerConferenceListener to/from the source
                 * CallPeer (for the purposes of the
                 * addCallPeerConferenceListener method of this CallConference).
                 */ CallPeer callPeer = ev . getSourceCallPeer ( ) ; switch ( eventID ) { case CallPeerEvent . CALL_PEER_ADDED : callPeer . addCallPeerConferenceListener ( callPeerConferenceListener ) ; break ; case CallPeerEvent . CALL_PEER_REMOVED : callPeer . removeCallPeerConferenceListener ( callPeerConferenceListener ) ; break ; default : break ; } } } }
Notifies this telephony conference about a specific
 <tt>CallPeerEvent</tt> i.e.
Notifies this telephony conference about a specific <tt > CallPeerEvent< / tt > i . e .
// Forward the CallPeerEvent to the callChangeListeners.