Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.protocol.jabber
Class OperationSetTelephonyConferencingJabberImpl

java.lang.Object
  extended by net.java.sip.communicator.service.protocol.media.AbstractOperationSetTelephonyConferencing<ProtocolProviderServiceJabberImpl,OperationSetBasicTelephonyJabberImpl,CallJabberImpl,CallPeerJabberImpl,String>
      extended by net.java.sip.communicator.impl.protocol.jabber.OperationSetTelephonyConferencingJabberImpl
All Implemented Interfaces:
PropertyChangeListener, EventListener, CallChangeListener, CallListener, RegistrationStateChangeListener, OperationSet, OperationSetTelephonyConferencing, org.jivesoftware.smack.filter.PacketFilter, org.jivesoftware.smack.PacketListener

public class OperationSetTelephonyConferencingJabberImpl
extends AbstractOperationSetTelephonyConferencing<ProtocolProviderServiceJabberImpl,OperationSetBasicTelephonyJabberImpl,CallJabberImpl,CallPeerJabberImpl,String>
implements RegistrationStateChangeListener, org.jivesoftware.smack.PacketListener, org.jivesoftware.smack.filter.PacketFilter

Implements OperationSetTelephonyConferencing for Jabber.

Author:
Lyubomir Marinov, Sebastien Vincent

Field Summary
 
Fields inherited from class net.java.sip.communicator.service.protocol.media.AbstractOperationSetTelephonyConferencing
parentProvider
 
Constructor Summary
OperationSetTelephonyConferencingJabberImpl(ProtocolProviderServiceJabberImpl parentProvider)
          Initializes a new OperationSetTelephonyConferencingJabberImpl instance which is to provide telephony conferencing services for the specified Jabber ProtocolProviderService implementation.
 
Method Summary
 boolean accept(org.jivesoftware.smack.packet.Packet packet)
          Tests whether or not the specified packet should be handled by this operation set.
protected  void basicTelephonyChanged(OperationSetBasicTelephonyJabberImpl oldValue, OperationSetBasicTelephonyJabberImpl newValue)
          Notifies this OperationSetTelephonyConferencing that its basicTelephony property has changed its value from a specific oldValue to a specific newValue
protected  CallJabberImpl createOutgoingCall()
          Creates a new outgoing Call into which conference callees are to be invited by this OperationSetTelephonyConferencing.
protected  CallPeer inviteCalleeToCall(String calleeAddress, CallJabberImpl call, boolean wasConferenceFocus)
          Invites a callee with a specific address to be joined in a specific Call in the sense of conferencing.
protected  void notifyAll(Call call)
          Notifies all CallPeer associated with and established in a specific call for conference information.
protected  String 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 processPacket(org.jivesoftware.smack.packet.Packet packet)
          Handles incoming jingle packets and passes them to the corresponding method based on their action.
 void registrationStateChanged(RegistrationStateChangeEvent evt)
          Implementation of method registrationStateChange from interface RegistrationStateChangeListener for setting up (or down) our JingleManager when an XMPPConnection is available
 
Methods inherited from class net.java.sip.communicator.service.protocol.media.AbstractOperationSetTelephonyConferencing
callBegun, callEnded, callPeerAdded, callPeerRemoved, callStateChanged, createConfCall, createConfCall, getBasicTelephony, incomingCallReceived, inviteCalleeToCall, outgoingCallCreated, propertyChange
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OperationSetTelephonyConferencingJabberImpl

public OperationSetTelephonyConferencingJabberImpl(ProtocolProviderServiceJabberImpl parentProvider)
Initializes a new OperationSetTelephonyConferencingJabberImpl instance which is to provide telephony conferencing services for the specified Jabber ProtocolProviderService implementation.

Parameters:
parentProvider - the Jabber 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(OperationSetBasicTelephonyJabberImpl oldValue,
                                     OperationSetBasicTelephonyJabberImpl newValue)
Notifies this OperationSetTelephonyConferencing that its basicTelephony property has changed its value from a specific oldValue to a specific newValue

Overrides:
basicTelephonyChanged in class AbstractOperationSetTelephonyConferencing<ProtocolProviderServiceJabberImpl,OperationSetBasicTelephonyJabberImpl,CallJabberImpl,CallPeerJabberImpl,String>
Parameters:
oldValue - the old value of the basicTelephony property
newValue - the new value of the basicTelephony property

notifyAll

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

Specified by:
notifyAll in class AbstractOperationSetTelephonyConferencing<ProtocolProviderServiceJabberImpl,OperationSetBasicTelephonyJabberImpl,CallJabberImpl,CallPeerJabberImpl,String>
Parameters:
call - the Call

registrationStateChanged

public void registrationStateChanged(RegistrationStateChangeEvent evt)
Implementation of method registrationStateChange from interface RegistrationStateChangeListener for setting up (or down) our JingleManager when an XMPPConnection is available

Specified by:
registrationStateChanged in interface RegistrationStateChangeListener
Overrides:
registrationStateChanged in class AbstractOperationSetTelephonyConferencing<ProtocolProviderServiceJabberImpl,OperationSetBasicTelephonyJabberImpl,CallJabberImpl,CallPeerJabberImpl,String>
Parameters:
evt - the event received

createOutgoingCall

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

Specified by:
createOutgoingCall in class AbstractOperationSetTelephonyConferencing<ProtocolProviderServiceJabberImpl,OperationSetBasicTelephonyJabberImpl,CallJabberImpl,CallPeerJabberImpl,String>
Returns:
a new outgoing Call into which conference callees are to be invited by this OperationSetTelephonyConferencing
Throws:
OperationFailedException - if anything goes wrong

inviteCalleeToCall

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

Specified by:
inviteCalleeToCall in class AbstractOperationSetTelephonyConferencing<ProtocolProviderServiceJabberImpl,OperationSetBasicTelephonyJabberImpl,CallJabberImpl,CallPeerJabberImpl,String>
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 String 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.

Specified by:
parseAddressString in class AbstractOperationSetTelephonyConferencing<ProtocolProviderServiceJabberImpl,OperationSetBasicTelephonyJabberImpl,CallJabberImpl,CallPeerJabberImpl,String>
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

accept

public boolean accept(org.jivesoftware.smack.packet.Packet packet)
Tests whether or not the specified packet should be handled by this operation set. This method is called by smack prior to packet delivery and it would only accept CoinIQs.

Specified by:
accept in interface org.jivesoftware.smack.filter.PacketFilter
Parameters:
packet - the packet to test.
Returns:
true if and only if packet passes the filter.

processPacket

public void processPacket(org.jivesoftware.smack.packet.Packet packet)
Handles incoming jingle packets and passes them to the corresponding method based on their action.

Specified by:
processPacket in interface org.jivesoftware.smack.PacketListener
Parameters:
packet - the packet to process.

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

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