T
- the peer extension class like for example CallPeerSipImpl
or CallPeerJabberImplU
- the provider extension class like for example
ProtocolProviderServiceSipImpl or
ProtocolProviderServiceJabberImplpublic abstract class AbstractCall<T extends CallPeer,U extends ProtocolProviderService> extends Call
CONFERENCE, CONFERENCE_FOCUS, useTranslator
Modifier | Constructor and Description |
---|---|
protected |
AbstractCall(U sourceProvider)
Creates a new Call instance.
|
Modifier and Type | Method and Description |
---|---|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds a specific PropertyChangeListener to the list of listeners
interested in and notified about changes in the values of the properties
of this Call.
|
protected boolean |
doAddCallPeer(T callPeer)
Adds a specific CallPeer to the list of CallPeers of
this Call if the list does not contain it; otherwise, does
nothing.
|
protected boolean |
doRemoveCallPeer(T callPeer)
Removes a specific CallPeer from the list of CallPeers
of this Call if the list does contain it; otherwise, does
nothing.
|
protected void |
firePropertyChange(java.lang.String property,
java.lang.Object oldValue,
java.lang.Object newValue)
Fires a new PropertyChangeEvent to the
PropertyChangeListeners registered with this Call in
order to notify about a change in the value of a specific property which
had its old value modified to a specific new value.
|
int |
getCallPeerCount()
Returns the number of peers currently associated with this call.
|
java.util.List<T> |
getCallPeerList()
Gets an unmodifiable List of the CallPeers of this
Call.
|
java.util.Iterator<T> |
getCallPeers()
Returns an Iterator over the (list of) CallPeers of
this Call.
|
U |
getProtocolProvider()
Returns a reference to the ProtocolProviderService instance
that created this call.
|
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Removes a specific PropertyChangeListener from the list of
listeners interested in and notified about changes in the values of the
properties of this Call.
|
addCallChangeListener, addLocalUserSoundLevelListener, createConference, equals, fireCallChangeEvent, fireCallChangeEvent, fireCallPeerEvent, fireCallPeerEvent, getCallID, getCallState, getConference, hashCode, isAutoAnswer, isConferenceFocus, isDefaultEncrypted, isSipZrtpAttribute, removeCallChangeListener, removeLocalUserSoundLevelListener, setAutoAnswer, setCallState, setCallState, setConference, toString
getData, setData
protected AbstractCall(U sourceProvider)
sourceProvider
- the proto provider that created us.public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
propertyChangeSupport
.addPropertyChangeListener
in class Call
listener
- a PropertyChangeListener to be notified about
changes in the values of the properties of this Call. If the
specified listener is already in the list of interested listeners (i.e.
it has been previously added), it is not added again.protected boolean doAddCallPeer(T callPeer)
CallPeerEvent.CALL_PEER_ADDED
.
The method is named doAddCallPeer and not addCallPeer because, at the time of its introduction, multiple extenders have already defined an addCallPeer method with the same argument but with no return value.
callPeer
- the CallPeer to be added to the list of
CallPeers of this Calljava.lang.NullPointerException
- if callPeer is nullprotected boolean doRemoveCallPeer(T callPeer)
CallPeerEvent.CALL_PEER_REMOVED
.
The method is named doRemoveCallPeer and not removeCallPeer because, at the time of its introduction, multiple extenders have already defined a removeCallPeer method with the same argument but with no return value.
callPeer
- the CallPeer to be removed from the list of
CallPeers of this Callprotected void firePropertyChange(java.lang.String property, java.lang.Object oldValue, java.lang.Object newValue)
propertyChangeSupport
.firePropertyChange
in class Call
property
- the name of the property of this Call which had
its value changedoldValue
- the value of the property with the specified name before
the changenewValue
- the value of the property with the specified name after
the changepublic int getCallPeerCount()
getCallPeerCount
in class Call
public java.util.List<T> getCallPeerList()
Call.getCallPeers()
returns
an Iterator over the same List.public java.util.Iterator<T> getCallPeers()
getCallPeerList()
.getCallPeers
in class Call
public U getProtocolProvider()
getProtocolProvider
in class Call
public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
propertyChangeSupport
.removePropertyChangeListener
in class Call
listener
- a PropertyChangeListener to no longer be
notified about changes in the values of the properties of this Call
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.