public abstract class Call extends DataObject
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CONFERENCE
The name of the Call property which represents its telephony
conference-related state.
|
static java.lang.String |
CONFERENCE_FOCUS
The name of the Call property which indicates whether the local
peer/user represented by the respective Call is acting as a
conference focus.
|
protected boolean |
useTranslator
The indicator which determines whether any telephony conference
represented by this instance is mixing or relaying.
|
Modifier | Constructor and Description |
---|---|
protected |
Call(ProtocolProviderService sourceProvider)
Creates a new Call instance.
|
Modifier and Type | Method and Description |
---|---|
void |
addCallChangeListener(CallChangeListener listener)
Adds a call change listener to this call so that it could receive events
on new call peers, theme changes and others.
|
abstract void |
addLocalUserSoundLevelListener(SoundLevelListener l)
Adds a specific SoundLevelListener to the list of
listeners interested in and notified about changes in local sound level
information.
|
abstract 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 CallConference |
createConference()
Creates a new CallConference instance which is to represent the
telephony conference-related state of this Call.
|
boolean |
equals(java.lang.Object obj)
Compares the specified object with this call and returns true if it the
specified object is an instance of a Call object and if the
extending telephony protocol considers the calls represented by both
objects to be the same.
|
protected void |
fireCallChangeEvent(java.lang.String type,
java.lang.Object oldValue,
java.lang.Object newValue)
Creates a CallChangeEvent with this class as
sourceCall, and the specified eventID and old and new
values and dispatches it on all currently registered listeners.
|
protected void |
fireCallChangeEvent(java.lang.String type,
java.lang.Object oldValue,
java.lang.Object newValue,
CallPeerChangeEvent cause)
Creates a CallChangeEvent with this class as
sourceCall, and the specified eventID and old and new
values and dispatches it on all currently registered listeners.
|
protected void |
fireCallPeerEvent(CallPeer sourceCallPeer,
int eventID)
Creates a CallPeerEvent with
sourceCallPeer and eventID and dispatches it on
all currently registered listeners.
|
protected void |
fireCallPeerEvent(CallPeer sourceCallPeer,
int eventID,
boolean delayed)
Creates a CallPeerEvent with
sourceCallPeer and eventID and dispatches it on
all currently registered listeners.
|
protected abstract 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.
|
java.lang.String |
getCallID()
Returns the id of the specified Call.
|
abstract int |
getCallPeerCount()
Returns the number of peers currently associated with this call.
|
abstract java.util.Iterator<? extends CallPeer> |
getCallPeers()
Returns an iterator over all call peers.
|
CallState |
getCallState()
Returns the state that this call is currently in.
|
CallConference |
getConference()
Gets the telephony conference-related state of this Call.
|
ProtocolProviderService |
getProtocolProvider()
Returns a reference to the ProtocolProviderService instance
that created this call.
|
int |
hashCode()
Returns a hash code value for this call.
|
boolean |
isAutoAnswer()
Returns true iff incoming calls into this Call should
be auto-answered.
|
abstract boolean |
isConferenceFocus()
Gets the indicator which determines whether the local peer represented by
this Call is acting as a conference focus.
|
boolean |
isDefaultEncrypted()
Returns the default call encryption flag
|
boolean |
isSipZrtpAttribute()
Check if to include the ZRTP attribute to SIP/SDP
|
void |
removeCallChangeListener(CallChangeListener listener)
Removes listener to this call so that it won't receive further
CallChangeEvents.
|
abstract void |
removeLocalUserSoundLevelListener(SoundLevelListener l)
Removes a specific SoundLevelListener from the list of
listeners interested in and notified about changes in local sound level
information.
|
abstract 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.
|
void |
setAutoAnswer(boolean autoAnswer)
Sets the flag that specifies whether incoming calls into this
Call should be auto-answered.
|
protected void |
setCallState(CallState newState)
Sets the state of this call and fires a call change event notifying
registered listeners for the change.
|
protected void |
setCallState(CallState newState,
CallPeerChangeEvent cause)
Sets the state of this Call and fires a new
CallChangeEvent notifying the registered
CallChangeListeners about the change of the state.
|
void |
setConference(CallConference conference)
Sets the telephony conference-related state of this Call.
|
java.lang.String |
toString()
Returns a string textually representing this Call.
|
getData, setData
public static final java.lang.String CONFERENCE
public static final java.lang.String CONFERENCE_FOCUS
protected final boolean useTranslator
protected Call(ProtocolProviderService sourceProvider)
sourceProvider
- the proto provider that created us.public java.lang.String getCallID()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- the call to compare this one with.public int hashCode()
hashCode
in class java.lang.Object
public void addCallChangeListener(CallChangeListener listener)
listener
- the listener to registerpublic void removeCallChangeListener(CallChangeListener listener)
listener
- the listener to registerpublic ProtocolProviderService getProtocolProvider()
protected void fireCallPeerEvent(CallPeer sourceCallPeer, int eventID)
sourceCallPeer
- the source CallPeer for the
newly created event.eventID
- the ID of the event to create (see constants defined in
CallPeerEvent)protected void fireCallPeerEvent(CallPeer sourceCallPeer, int eventID, boolean delayed)
sourceCallPeer
- the source CallPeer for the
newly created event.eventID
- the ID of the event to create (see constants defined in
CallPeerEvent)delayed
- true if the adding/removing of the peer from the
GUI should be delayed and false if not.public java.lang.String toString()
toString
in class java.lang.Object
protected void fireCallChangeEvent(java.lang.String type, java.lang.Object oldValue, java.lang.Object newValue)
type
- the type of the event to create (see CallChangeEvent member
ints)oldValue
- the value of the call property that changed, before the
event had occurred.newValue
- the value of the call property that changed, after the
event has occurred.protected void fireCallChangeEvent(java.lang.String type, java.lang.Object oldValue, java.lang.Object newValue, CallPeerChangeEvent cause)
type
- the type of the event to create (see CallChangeEvent member
ints)oldValue
- the value of the call property that changed, before the
event had occurred.newValue
- the value of the call property that changed, after the
event has occurred.cause
- the event that is the initial cause of the current one.public CallState getCallState()
protected void setCallState(CallState newState)
newState
- a reference to the CallState instance that the
call is to enter.protected void setCallState(CallState newState, CallPeerChangeEvent cause)
newState
- the CallState into which this Call is
to entercause
- the CallPeerChangeEvent which is the cause for the
request to have this Call enter the specified CallStatepublic boolean isDefaultEncrypted()
public boolean isSipZrtpAttribute()
public abstract java.util.Iterator<? extends CallPeer> getCallPeers()
public abstract int getCallPeerCount()
public abstract boolean isConferenceFocus()
public abstract void addLocalUserSoundLevelListener(SoundLevelListener l)
l
- the SoundLevelListener to addpublic abstract void removeLocalUserSoundLevelListener(SoundLevelListener l)
l
- the SoundLevelListener to removeprotected CallConference createConference()
public CallConference getConference()
public void setConference(CallConference conference)
conference
- the CallConference instance to represent the
telephony conference-related state of this Callpublic abstract void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
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 abstract void firePropertyChange(java.lang.String property, java.lang.Object oldValue, java.lang.Object newValue)
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 abstract void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- a PropertyChangeListener to no longer be
notified about changes in the values of the properties of this Callpublic boolean isAutoAnswer()
public void setAutoAnswer(boolean autoAnswer)
autoAnswer
- whether incoming calls into this Call should
be auto-answered.
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.