Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.service.protocol.media
Class AbstractOperationSetTelephonyConferencing<ProtocolProviderServiceT extends ProtocolProviderService,OperationSetBasicTelephonyT extends OperationSetBasicTelephony<ProtocolProviderServiceT>,MediaAwareCallT extends MediaAwareCall<MediaAwareCallPeerT,OperationSetBasicTelephonyT,ProtocolProviderServiceT>,MediaAwareCallPeerT extends MediaAwareCallPeer<MediaAwareCallT,?,ProtocolProviderServiceT>,CalleeAddressT>

java.lang.Object
  extended by net.java.sip.communicator.service.protocol.media.AbstractOperationSetTelephonyConferencing<ProtocolProviderServiceT,OperationSetBasicTelephonyT,MediaAwareCallT,MediaAwareCallPeerT,CalleeAddressT>
Type Parameters:
ProtocolProviderServiceT -
OperationSetBasicTelephonyT -
MediaAwareCallT -
MediaAwareCallPeerT -
CalleeAddressT -
All Implemented Interfaces:
PropertyChangeListener, EventListener, CallChangeListener, CallListener, RegistrationStateChangeListener, OperationSet, OperationSetTelephonyConferencing
Direct Known Subclasses:
OperationSetTelephonyConferencingJabberImpl, OperationSetTelephonyConferencingSipImpl

public abstract class AbstractOperationSetTelephonyConferencing<ProtocolProviderServiceT extends ProtocolProviderService,OperationSetBasicTelephonyT extends OperationSetBasicTelephony<ProtocolProviderServiceT>,MediaAwareCallT extends MediaAwareCall<MediaAwareCallPeerT,OperationSetBasicTelephonyT,ProtocolProviderServiceT>,MediaAwareCallPeerT extends MediaAwareCallPeer<MediaAwareCallT,?,ProtocolProviderServiceT>,CalleeAddressT>
extends Object
implements OperationSetTelephonyConferencing, RegistrationStateChangeListener, PropertyChangeListener, CallListener, CallChangeListener

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

Author:
Lyubomir Marinov

Field Summary
protected  ProtocolProviderServiceT parentProvider
          The ProtocolProviderService implementation which created this instance and for which telephony conferencing services are being provided by this instance.
 
Constructor Summary
protected AbstractOperationSetTelephonyConferencing(ProtocolProviderServiceT parentProvider)
          Initializes a new AbstractOperationSetTelephonyConferencing instance which is to provide telephony conferencing services for the specified ProtocolProviderService implementation.
 
Method Summary
protected  void basicTelephonyChanged(OperationSetBasicTelephonyT oldValue, OperationSetBasicTelephonyT newValue)
          Notifies this OperationSetTelephonyConferencing that its basicTelephony property has changed its value from a specific oldValue to a specific newValue
protected  void callBegun(CallEvent event)
          Notifies this CallListener that a specific Call has been established.
 void callEnded(CallEvent event)
          Notifies this CallListener that a specific Call has ended.
 void callPeerAdded(CallPeerEvent event)
          Notifies this CallChangeListener that a specific CallPeer has been added to a specific Call.
 void callPeerRemoved(CallPeerEvent event)
          Notifies this CallChangeListener that a specific CallPeer has been remove from a specific Call.
 void callStateChanged(CallChangeEvent event)
          Notifies this CallChangeListener that a specific Call has changed its state.
 Call createConfCall(String[] callees)
          Creates a conference call with the specified callees as call peers.
 Call createConfCall(String[] callees, CallGroup group)
          Creates a conference call with the specified callees as call peers.
protected abstract  MediaAwareCallT createOutgoingCall()
          Creates a new outgoing Call into which conference callees are to be invited by this OperationSetTelephonyConferencing.
 OperationSetBasicTelephonyT getBasicTelephony()
          Gets the OperationSetBasicTelephony implementation which this instance uses to carry out tasks such as establishing Calls.
 void incomingCallReceived(CallEvent event)
          Notifies this CallListener that a specific incoming Call has been received.
protected abstract  CallPeer inviteCalleeToCall(CalleeAddressT calleeAddress, MediaAwareCallT call, boolean wasConferenceFocus)
          Invites a callee with a specific address to be joined in a specific Call in the sense of conferencing.
 CallPeer inviteCalleeToCall(String uri, Call call)
          Invites the callee represented by the specified uri to an already existing call.
protected abstract  void notifyAll(Call call)
          Notifies all CallPeer associated with and established in a specific call for conference information.
 void outgoingCallCreated(CallEvent event)
          Notifies this CallListener that a specific outgoing Call has been created.
protected abstract  CalleeAddressT parseAddressString(String calleeAddressString)
          Parses a String value which represents a callee address specified by the user into an object which is to actually represent the callee during the invitation to a conference Call.
 void propertyChange(PropertyChangeEvent event)
          Notifies this PropertyChangeListener that the value of a specific property of the notifier it is registered with has changed.
 void registrationStateChanged(RegistrationStateChangeEvent event)
          Notifies this RegistrationStateChangeListener that the ProtocolProviderSerivce it is registered with has changed its registration state.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

parentProvider

protected final ProtocolProviderServiceT extends ProtocolProviderService parentProvider
The ProtocolProviderService implementation which created this instance and for which telephony conferencing services are being provided by this instance.

Constructor Detail

AbstractOperationSetTelephonyConferencing

protected AbstractOperationSetTelephonyConferencing(ProtocolProviderServiceT parentProvider)
Initializes a new AbstractOperationSetTelephonyConferencing instance which is to provide telephony conferencing services for the specified ProtocolProviderService implementation.

Parameters:
parentProvider - the ProtocolProviderService implementation which has requested the creation of the new instance and for which the new instance is to provide telephony conferencing services
Method Detail

basicTelephonyChanged

protected void basicTelephonyChanged(OperationSetBasicTelephonyT oldValue,
                                     OperationSetBasicTelephonyT newValue)
Notifies this OperationSetTelephonyConferencing that its basicTelephony property has changed its value from a specific oldValue to a specific newValue

Parameters:
oldValue - the old value of the basicTelephony property
newValue - the new value of the basicTelephony property

createConfCall

public Call createConfCall(String[] callees)
                    throws OperationFailedException
Creates a conference call with the specified callees as call peers.

Specified by:
createConfCall in interface OperationSetTelephonyConferencing
Parameters:
callees - the list of addresses that we should call
Returns:
the newly created conference call containing all CallPeers
Throws:
OperationFailedException - if establishing the conference call fails
See Also:
OperationSetTelephonyConferencing.createConfCall(String[])

createConfCall

public Call createConfCall(String[] callees,
                           CallGroup group)
                    throws OperationFailedException
Creates a conference call with the specified callees as call peers.

Specified by:
createConfCall in interface OperationSetTelephonyConferencing
Parameters:
callees - the list of addresses that we should call
group - the CallGroup or null
Returns:
the newly created conference call containing all CallPeers
Throws:
OperationFailedException - if establishing the conference call fails
See Also:
OperationSetTelephonyConferencing.createConfCall(String[])

createOutgoingCall

protected abstract MediaAwareCallT createOutgoingCall()
                                                                                                                                                throws OperationFailedException
Creates a new outgoing Call into which conference callees are to be invited by this OperationSetTelephonyConferencing.

Returns:
a new outgoing Call into which conference callees are to be invited by this OperationSetTelephonyConferencing
Throws:
OperationFailedException - if anything goes wrong

getBasicTelephony

public OperationSetBasicTelephonyT getBasicTelephony()
Gets the OperationSetBasicTelephony implementation which this instance uses to carry out tasks such as establishing Calls.

Returns:
the OperationSetBasicTelephony implementation which this instance uses to carry out tasks such as establishing Calls

inviteCalleeToCall

public CallPeer inviteCalleeToCall(String uri,
                                   Call call)
                            throws OperationFailedException
Invites the callee represented by the specified uri to an already existing call. The difference between this method and createConfCall is that inviteCalleeToCall allows a user to transform an existing 1 to 1 call into a conference call, or add new peers to an already established conference.

Specified by:
inviteCalleeToCall in interface OperationSetTelephonyConferencing
Parameters:
uri - the callee to invite to an existing conf call.
call - the call that we should invite the callee to.
Returns:
the CallPeer object corresponding to the callee represented by the specified uri.
Throws:
OperationFailedException - if inviting the specified callee to the specified call fails

inviteCalleeToCall

protected abstract CallPeer inviteCalleeToCall(CalleeAddressT calleeAddress,
                                               MediaAwareCallT call,
                                               boolean wasConferenceFocus)
                                        throws OperationFailedException
Invites a callee with a specific address to be joined in a specific Call in the sense of conferencing.

Parameters:
calleeAddress - the address of the callee to be invited to the specified existing Call
call - the existing Call to invite the callee with the specified address to
wasConferenceFocus - the value of the conferenceFocus property of the specified call prior to the request to invite the specified calleeAddress
Returns:
a new CallPeer instance which describes the signaling and the media streaming of the newly-invited callee within the specified Call
Throws:
OperationFailedException - if inviting the specified callee to the specified call fails

parseAddressString

protected abstract CalleeAddressT parseAddressString(String calleeAddressString)
                                              throws OperationFailedException
Parses a String value which represents a callee address specified by the user into an object which is to actually represent the callee during the invitation to a conference Call.

Parameters:
calleeAddressString - a String value which represents a callee address to be parsed into an object which is to actually represent the callee during the invitation to a conference Call
Returns:
an object which is to actually represent the specified calleeAddressString during the invitation to a conference Call
Throws:
OperationFailedException - if parsing the specified calleeAddressString fails

registrationStateChanged

public void registrationStateChanged(RegistrationStateChangeEvent event)
Notifies this RegistrationStateChangeListener that the ProtocolProviderSerivce it is registered with has changed its registration state.

Specified by:
registrationStateChanged in interface RegistrationStateChangeListener
Parameters:
event - a RegistrationStateChangeEvent which specifies the old and the new value of the registration state of the ProtocolProviderService this RegistrationStateChangeListener listens to

callPeerAdded

public void callPeerAdded(CallPeerEvent event)
Notifies this CallChangeListener that a specific CallPeer has been added to a specific Call.

Specified by:
callPeerAdded in interface CallChangeListener
Parameters:
event - a CallPeerEvent which specifies the CallPeer which has been added to a Call

callPeerRemoved

public void callPeerRemoved(CallPeerEvent event)
Notifies this CallChangeListener that a specific CallPeer has been remove from a specific Call.

Specified by:
callPeerRemoved in interface CallChangeListener
Parameters:
event - a CallPeerEvent which specifies the CallPeer which has been removed from a Call

propertyChange

public void propertyChange(PropertyChangeEvent event)
Notifies this PropertyChangeListener that the value of a specific property of the notifier it is registered with has changed.

Specified by:
propertyChange in interface PropertyChangeListener
Parameters:
event - a PropertyChangeEvent which describes the source of the event, the name of the property which has changed its value and the old and new values of the property
See Also:
PropertyChangeListener.propertyChange(PropertyChangeEvent)

incomingCallReceived

public void incomingCallReceived(CallEvent event)
Notifies this CallListener that a specific incoming Call has been received.

Specified by:
incomingCallReceived in interface CallListener
Parameters:
event - a CallEvent which specifies the newly-received incoming Call

outgoingCallCreated

public void outgoingCallCreated(CallEvent event)
Notifies this CallListener that a specific outgoing Call has been created.

Specified by:
outgoingCallCreated in interface CallListener
Parameters:
event - a CallEvent which specifies the newly-created outgoing Call

callEnded

public void callEnded(CallEvent event)
Notifies this CallListener that a specific Call has ended.

Specified by:
callEnded in interface CallListener
Parameters:
event - a CallEvent which specified the Call which has just ended

callBegun

protected void callBegun(CallEvent event)
Notifies this CallListener that a specific Call has been established.

Parameters:
event - a CallEvent which specified the newly-established Call

callStateChanged

public void callStateChanged(CallChangeEvent event)
Notifies this CallChangeListener that a specific Call has changed its state. Does nothing.

Specified by:
callStateChanged in interface CallChangeListener
Parameters:
event - a CallChangeEvent which specifies the Call which has changed its state, the very state which has been changed and the values of the state before and after the change

notifyAll

protected abstract void notifyAll(Call call)
Notifies all CallPeer associated with and established in a specific call for conference information.

Parameters:
call - the Call

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

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