@ -22,9 +22,9 @@ public class MockCall
private static final Logger logger = Logger . getLogger ( MockCall . class ) ;
/ * *
* A list containing all < tt > CallP articipant < / tt > s of this call .
* A list containing all < tt > CallP eer < / tt > s of this call .
* /
private Vector callParticipants = new Vector ( ) ;
private Vector < CallPeer > callPeers = new Vector < CallPeer > ( ) ;
public MockCall ( MockProvider sourceProvider )
@ -33,68 +33,68 @@ public MockCall(MockProvider sourceProvider)
}
/ * *
* Returns an iterator over all call p articipant s.
* Returns an iterator over all call p eer s.
*
* @return an Iterator over all p articipant s currently involved in the
* @return an Iterator over all p eer s currently involved in the
* call .
* /
public Iterator getCallPeers ( )
public Iterator < CallPeer > getCallPeers ( )
{
return callP articipant s. iterator ( ) ;
return callP eer s. iterator ( ) ;
}
/ * *
* Returns the number of p articipant s currently associated with this call .
* Returns the number of p eer s currently associated with this call .
*
* @return an < tt > int < / tt > indicating the number of p articipant s
* @return an < tt > int < / tt > indicating the number of p eer s
* currently associated with this call .
* /
public int getCallPeerCount ( )
{
return callP articipant s. size ( ) ;
return callP eer s. size ( ) ;
}
/ * *
* Adds < tt > callP articipant < / tt > to the list of p articipant s in this call .
* If the call p articipant is already included in the call , the method has
* Adds < tt > callP eer < / tt > to the list of p eer s in this call .
* If the call p eer is already included in the call , the method has
* no effect .
*
* @param callP articipant the new < tt > CallParticipant < / tt >
* @param callP eer the new < tt > CallPeer < / tt >
* /
public void addCallP articipant( MockCallPeer callParticipant )
public void addCallP eer( MockCallPeer callPeer )
{
if ( callP articipants. contains ( callParticipant ) )
if ( callP eers. contains ( callPeer ) )
return ;
callP articipant . addCallPeerListener ( this ) ;
callP eer . addCallPeerListener ( this ) ;
this . callP articipants. add ( callParticipant ) ;
this . callP eers. add ( callPeer ) ;
logger . info ( "Will fire p articipant added") ;
logger . info ( "Will fire p eer added") ;
fireCallPeerEvent (
callP articipant , CallPeerEvent . CALL_PEER_ADDED ) ;
callP eer , CallPeerEvent . CALL_PEER_ADDED ) ;
}
/ * *
* Removes < tt > callP articipant < / tt > from the list of p articipant s in this
* call . The method has no effect if there was no such p articipant in the
* Removes < tt > callP eer < / tt > from the list of p eer s in this
* call . The method has no effect if there was no such p eer in the
* call .
*
* @param callP articipant the < tt > CallParticipant < / tt > leaving the call ;
* @param callP eer the < tt > CallPeer < / tt > leaving the call ;
* /
public void removeCallP articipant( MockCallPeer callParticipant )
public void removeCallP eer( MockCallPeer callPeer )
{
if ( ! callP articipants. contains ( callParticipant ) )
if ( ! callP eers. contains ( callPeer ) )
return ;
this . callP articipants. remove ( callParticipant ) ;
callP articipant . removeCallPeerListener ( this ) ;
this . callP eers. remove ( callPeer ) ;
callP eer . removeCallPeerListener ( this ) ;
fireCallPeerEvent (
callP articipant , CallPeerEvent . CALL_PEER_REMVOVED ) ;
callP eer , CallPeerEvent . CALL_PEER_REMVOVED ) ;
if ( callP articipant s. size ( ) = = 0 )
if ( callP eer s. size ( ) = = 0 )
setCallState ( CallState . CALL_ENDED ) ;
}
@ -105,7 +105,7 @@ public void peerStateChanged(CallPeerChangeEvent evt)
| | ( ( CallPeerState ) evt . getNewValue ( ) )
= = CallPeerState . FAILED )
{
removeCallP articipant (
removeCallP eer (
( MockCallPeer ) evt . getSourceCallPeer ( ) ) ;
}
else if ( ( ( CallPeerState ) evt . getNewValue ( ) )