SIP Communicator: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.service.protocol
Class AbstractOperationSetBasicTelephony<T extends ProtocolProviderService>

java.lang.Object
  extended by net.java.sip.communicator.service.protocol.AbstractOperationSetBasicTelephony<T>
Type Parameters:
T - the implementation specific provider class like for example ProtocolProviderServiceSipImpl.
All Implemented Interfaces:
OperationSet, OperationSetBasicTelephony<T>
Direct Known Subclasses:
MockOperationSetBasicTelephony, OperationSetBasicTelephonyGibberishImpl, OperationSetBasicTelephonyJabberImpl, OperationSetBasicTelephonySipImpl

public abstract class AbstractOperationSetBasicTelephony<T extends ProtocolProviderService>
extends java.lang.Object
implements OperationSetBasicTelephony<T>

Represents a default implementation of OperationSetBasicTelephony in order to make it easier for implementers to provide complete solutions while focusing on implementation-specific details.

Author:
Lubomir Marinov, Emil Ivov

Field Summary
 
Fields inherited from interface net.java.sip.communicator.service.protocol.OperationSetBasicTelephony
MAX_MEDIA_PORT_NUMBER_PROPERTY_NAME, MIN_MEDIA_PORT_NUMBER_PROPERTY_NAME
 
Constructor Summary
AbstractOperationSetBasicTelephony()
           
 
Method Summary
 void addCallListener(CallListener listener)
          Registers listener with this provider so that it could be notified when incoming calls are received.
 void fireCallEvent(int eventID, Call sourceCall)
          Creates and dispatches a CallEvent notifying registered listeners that an event with id eventID has occurred on sourceCall.
 void removeCallListener(CallListener listener)
          Removes the listener from the list of call listeners.
 void setMute(Call call, boolean mute)
          Sets the mute state of the Call.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.java.sip.communicator.service.protocol.OperationSetBasicTelephony
answerCallPeer, createCall, createCall, getActiveCalls, getProtocolProvider, hangupCallPeer, putOffHold, putOnHold
 

Constructor Detail

AbstractOperationSetBasicTelephony

public AbstractOperationSetBasicTelephony()
Method Detail

addCallListener

public void addCallListener(CallListener listener)
Registers listener with this provider so that it could be notified when incoming calls are received.

Specified by:
addCallListener in interface OperationSetBasicTelephony<T extends ProtocolProviderService>
Parameters:
listener - the listener to register with this provider.

fireCallEvent

public void fireCallEvent(int eventID,
                          Call sourceCall)
Creates and dispatches a CallEvent notifying registered listeners that an event with id eventID has occurred on sourceCall.

Parameters:
eventID - the ID of the event to dispatch
sourceCall - the call on which the event has occurred.

removeCallListener

public void removeCallListener(CallListener listener)
Removes the listener from the list of call listeners.

Specified by:
removeCallListener in interface OperationSetBasicTelephony<T extends ProtocolProviderService>
Parameters:
listener - the listener to unregister.

setMute

public void setMute(Call call,
                    boolean mute)
Sets the mute state of the Call.

Muting audio streams sent from the call is implementation specific and one of the possible approaches to it is sending silence.

Specified by:
setMute in interface OperationSetBasicTelephony<T extends ProtocolProviderService>
Parameters:
call - the Call whose mute state is to be set
mute - true to mute the call streams being sent to peers; otherwise, false

SIP Communicator: the OpenSource Java VoIP and Instant Messaging client.

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