Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.protocol.mock
Class MockCall

java.lang.Object
  extended by net.java.sip.communicator.service.protocol.Call
      extended by net.java.sip.communicator.service.protocol.AbstractCall<MockCallPeer,MockProvider>
          extended by net.java.sip.communicator.impl.protocol.mock.MockCall
All Implemented Interfaces:
EventListener, CallGroupListener, CallPeerListener

public class MockCall
extends AbstractCall<MockCallPeer,MockProvider>
implements CallPeerListener

Author:
Damian Minkov, Lubomir Marinov

Field Summary
 
Fields inherited from class net.java.sip.communicator.service.protocol.AbstractCall
callGroup
 
Constructor Summary
MockCall(MockProvider sourceProvider)
          Constructs a new MockCall.
 
Method Summary
 void addCallPeer(MockCallPeer callPeer)
          Adds callPeer to the list of peers in this call.
 void addLocalUserSoundLevelListener(SoundLevelListener l)
          Adds a specific SoundLevelListener to the list of listeners interested in and notified about changes in local sound level related information.
 void callAdded(CallGroupEvent evt)
          Notified when a call are added to a CallGroup.
 void callRemoved(CallGroupEvent evt)
          Notified when a call are removed from a CallGroup.
 boolean isConferenceFocus()
          Gets the indicator which determines whether the local peer represented by this Call is acting as a conference focus and thus should send the "isfocus" parameter in the Contact headers of its outgoing SIP signaling.
 void peerAddressChanged(CallPeerChangeEvent evt)
          Indicates that a change has occurred in the address of the source CallPeer.
 void peerDisplayNameChanged(CallPeerChangeEvent evt)
          Indicates that a change has occurred in the display name of the source CallPeer.
 void peerImageChanged(CallPeerChangeEvent evt)
          Indicates that a change has occurred in the image of the source CallPeer.
 void peerStateChanged(CallPeerChangeEvent evt)
          Indicates that a change has occurred in the status of the source CallPeer.
 void peerTransportAddressChanged(CallPeerChangeEvent evt)
          Indicates that a change has occurred in the transport address that we use to communicate with the peer.
 void removeCallPeer(MockCallPeer callPeer)
          Removes callPeer from the list of peers in this call.
 void removeLocalUserSoundLevelListener(SoundLevelListener l)
          Removes a specific SoundLevelListener of the list of listeners interested in and notified about changes in local sound level related information.
 
Methods inherited from class net.java.sip.communicator.service.protocol.AbstractCall
getCallGroup, getCallPeerCount, getCallPeers, getCallPeersVector, getCrossProtocolCallPeerCount, getCrossProtocolCallPeers, getCrossProtocolCallPeersVector, getProtocolProvider, setCallGroup
 
Methods inherited from class net.java.sip.communicator.service.protocol.Call
addCallChangeListener, equals, fireCallChangeEvent, fireCallChangeEvent, fireCallPeerEvent, getCallID, getCallState, hashCode, isDefaultEncrypted, isSipZrtpAttribute, removeCallChangeListener, setCallState, setCallState, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MockCall

public MockCall(MockProvider sourceProvider)
Constructs a new MockCall.

Parameters:
sourceProvider - Provider
Method Detail

addCallPeer

public void addCallPeer(MockCallPeer callPeer)
Adds callPeer to the list of peers in this call. If the call peer is already included in the call, the method has no effect.

Parameters:
callPeer - the new CallPeer

removeCallPeer

public void removeCallPeer(MockCallPeer callPeer)
Removes callPeer from the list of peers in this call. The method has no effect if there was no such peer in the call.

Parameters:
callPeer - the CallPeer leaving the call;

peerStateChanged

public void peerStateChanged(CallPeerChangeEvent evt)
Description copied from interface: CallPeerListener
Indicates that a change has occurred in the status of the source CallPeer.

Specified by:
peerStateChanged in interface CallPeerListener
Parameters:
evt - The CallPeerChangeEvent instance containing the source event as well as its previous and its new status.

peerDisplayNameChanged

public void peerDisplayNameChanged(CallPeerChangeEvent evt)
Description copied from interface: CallPeerListener
Indicates that a change has occurred in the display name of the source CallPeer.

Specified by:
peerDisplayNameChanged in interface CallPeerListener
Parameters:
evt - The CallPeerChangeEvent instance containing the source event as well as its previous and its new display names.

peerAddressChanged

public void peerAddressChanged(CallPeerChangeEvent evt)
Description copied from interface: CallPeerListener
Indicates that a change has occurred in the address of the source CallPeer.

Specified by:
peerAddressChanged in interface CallPeerListener
Parameters:
evt - The CallPeerChangeEvent instance containing the source event as well as its previous and its new address.

peerImageChanged

public void peerImageChanged(CallPeerChangeEvent evt)
Description copied from interface: CallPeerListener
Indicates that a change has occurred in the image of the source CallPeer.

Specified by:
peerImageChanged in interface CallPeerListener
Parameters:
evt - The CallPeerChangeEvent instance containing the source event as well as its previous and its new image.

peerTransportAddressChanged

public void peerTransportAddressChanged(CallPeerChangeEvent evt)
Description copied from interface: CallPeerListener
Indicates that a change has occurred in the transport address that we use to communicate with the peer.

Specified by:
peerTransportAddressChanged in interface CallPeerListener
Parameters:
evt - The CallPeerChangeEvent instance containing the source event as well as its previous and its new transport address.

isConferenceFocus

public boolean isConferenceFocus()
Gets the indicator which determines whether the local peer represented by this Call is acting as a conference focus and thus should send the "isfocus" parameter in the Contact headers of its outgoing SIP signaling.

Specified by:
isConferenceFocus in class Call
Returns:
true if the local peer represented by this Call is acting as a conference focus; otherwise, false

addLocalUserSoundLevelListener

public void addLocalUserSoundLevelListener(SoundLevelListener l)
Adds a specific SoundLevelListener to the list of listeners interested in and notified about changes in local sound level related information.

Specified by:
addLocalUserSoundLevelListener in class Call
Parameters:
l - the SoundLevelListener to add

removeLocalUserSoundLevelListener

public void removeLocalUserSoundLevelListener(SoundLevelListener l)
Removes a specific SoundLevelListener of the list of listeners interested in and notified about changes in local sound level related information.

Specified by:
removeLocalUserSoundLevelListener in class Call
Parameters:
l - the SoundLevelListener to remove

callAdded

public void callAdded(CallGroupEvent evt)
Notified when a call are added to a CallGroup.

Specified by:
callAdded in interface CallGroupListener
Parameters:
evt - event

callRemoved

public void callRemoved(CallGroupEvent evt)
Notified when a call are removed from a CallGroup.

Specified by:
callRemoved in interface CallGroupListener
Parameters:
evt - event

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.