src/net/java/sip/communicator/service/protocol/AbstractCallPeer.java
/**
     * Constructs a <tt>CallPeerChangeEvent</tt> using this call peer as source,
     * setting it to be of type <tt>eventType</tt> and the corresponding
     * <tt>oldValue</tt> and <tt>newValue</tt>.
     *
     * @param eventType the type of the event to create and dispatch.
     * @param oldValue the value of the source property before it changed.
     * @param newValue the current value of the source property.
     * @param reason a string that could be set to contain a human readable
     * explanation for the transition (particularly handy when moving into a
     * FAILED state).
     * @param reasonCode the reason code for the reason of this event.
     */
Constructs a CallPeerChangeEvent using this call peer as source,
setting it to be of type eventType and the corresponding
oldValue and newValue.

@param eventType the type of the event to create and dispatch.
@param oldValue the value of the source property before it changed.
@param newValue the current value of the source property.
@param reason a string that could be set to contain a human readable
explanation for the transition (particularly handy when moving into a
FAILED state).
@param reasonCode the reason code for the reason of this event.
Constructs a CallPeerChangeEvent using this call peer as source setting it to be of type eventType and the corresponding oldValue and newValue . @param eventType the type of the event to create and dispatch . @param oldValue the value of the source property before it changed . @param newValue the current value of the source property . @param reason a string that could be set to contain a human readable explanation for the transition ( particularly handy when moving into a FAILED state ) . @param reasonCode the reason code for the reason of this event .
protected void fireCallPeerChangeEvent(String eventType,
                                                  Object oldValue,
                                                  Object newValue,
                                                  String reason,
                                                  int reasonCode)
    {
        CallPeerChangeEvent evt = new CallPeerChangeEvent(
            this, eventType, oldValue, newValue, reason, reasonCode);
        if (logger.isDebugEnabled())
            logger.debug("Dispatching a CallPeerChangeEvent event to "
                     + callPeerListeners.size()
                     +" listeners. event is: " + evt.toString());
        Iterator<CallPeerListener> listeners = null;
        synchronized (callPeerListeners)
        {
            listeners = new ArrayList<CallPeerListener>(
                                callPeerListeners).iterator();
        }
        while (listeners.hasNext())
        {
            CallPeerListener listener = listeners.next();
            if (logger.isDebugEnabled())
                logger.debug("Dispatching a CallPeerChangeEvent event to "
                    + listener.getClass()
                    +" . event is: " + evt.toString());
            try
            {
                if(eventType.equals(CallPeerChangeEvent
                                    .CALL_PEER_ADDRESS_CHANGE))
                {
                    listener.peerAddressChanged(evt);
                } else if(eventType.equals(CallPeerChangeEvent
                                    .CALL_PEER_DISPLAY_NAME_CHANGE))
                {
                    listener.peerDisplayNameChanged(evt);
                } else if(eventType.equals(CallPeerChangeEvent
                                    .CALL_PEER_IMAGE_CHANGE))
                {
                    listener.peerImageChanged(evt);
                } else if(eventType.equals(CallPeerChangeEvent
                                    .CALL_PEER_STATE_CHANGE))
                {
                    listener.peerStateChanged(evt);
                }
            }
            catch(Throwable t)
            {
                logger.error("Error dispatching event of type"
                        + eventType + " in " + listener, t);
            }
        }
    }
protected void fireCallPeerChangeEvent ( String eventType , Object oldValue , Object newValue , String reason , int reasonCode ) { CallPeerChangeEvent evt = new CallPeerChangeEvent ( this , eventType , oldValue , newValue , reason , reasonCode ) ; if ( logger . isDebugEnabled ( ) ) logger . debug ( "Dispatching a CallPeerChangeEvent event to " + callPeerListeners . size ( ) + " listeners. event is: " + evt . toString ( ) ) ; Iterator < CallPeerListener > listeners = null ; synchronized ( callPeerListeners ) { listeners = new ArrayList < CallPeerListener > ( callPeerListeners ) . iterator ( ) ; } while ( listeners . hasNext ( ) ) { CallPeerListener listener = listeners . next ( ) ; if ( logger . isDebugEnabled ( ) ) logger . debug ( "Dispatching a CallPeerChangeEvent event to " + listener . getClass ( ) + " . event is: " + evt . toString ( ) ) ; try { if ( eventType . equals ( CallPeerChangeEvent . CALL_PEER_ADDRESS_CHANGE ) ) { listener . peerAddressChanged ( evt ) ; } else if ( eventType . equals ( CallPeerChangeEvent . CALL_PEER_DISPLAY_NAME_CHANGE ) ) { listener . peerDisplayNameChanged ( evt ) ; } else if ( eventType . equals ( CallPeerChangeEvent . CALL_PEER_IMAGE_CHANGE ) ) { listener . peerImageChanged ( evt ) ; } else if ( eventType . equals ( CallPeerChangeEvent . CALL_PEER_STATE_CHANGE ) ) { listener . peerStateChanged ( evt ) ; } } catch ( Throwable t ) { logger . error ( "Error dispatching event of type" + eventType + " in " + listener , t ) ; } } }
Constructs a <tt>CallPeerChangeEvent</tt> using this call peer as source,
 setting it to be of type <tt>eventType</tt> and the corresponding
 <tt>oldValue</tt> and <tt>newValue</tt>.
Constructs a <tt > CallPeerChangeEvent< / tt > using this call peer as source setting it to be of type <tt > eventType< / tt > and the corresponding <tt > oldValue< / tt > and <tt > newValue< / tt > .
// catch any possible errors, so we are sure we dispatch events // to all listeners