|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.java.sip.communicator.util.PropertyChangeNotifier
net.java.sip.communicator.service.protocol.AbstractCallPeer<T,U>
T - the call extension class like for example CallSipImpl
or CallJabberImplU - the provider extension class like for example
ProtocolProviderServiceSipImpl or
ProtocolProviderServiceJabberImplpublic abstract class AbstractCallPeer<T extends Call,U extends ProtocolProviderService>
Provides a default implementation for most of the CallPeer methods with the purpose of only leaving custom protocol development to clients using the PhoneUI service.
| Field Summary | |
|---|---|
protected List<CallPeerConferenceListener> |
callPeerConferenceListeners
The list of CallPeerConferenceListeners interested in and to be notified about changes in conference-related information such as this peer acting or not acting as a conference focus and conference membership details. |
protected List<CallPeerListener> |
callPeerListeners
All the CallPeer listeners registered with this CallPeer. |
protected List<CallPeerSecurityListener> |
callPeerSecurityListeners
All the CallPeerSecurityListener-s registered with this CallPeer. |
protected static ConferenceMember[] |
NO_CONFERENCE_MEMBERS
The constant which describes an empty set of ConferenceMembers (and which can be used to reduce allocations). |
| Fields inherited from interface net.java.sip.communicator.service.protocol.CallPeer |
|---|
CALL_DURATION_START_TIME_UNKNOWN, MUTE_PROPERTY_NAME |
| Constructor Summary | |
|---|---|
AbstractCallPeer()
|
|
| Method Summary | |
|---|---|
void |
addCallPeerConferenceListener(CallPeerConferenceListener listener)
Implements CallPeer#addCallPeerConferenceListener( CallPeerConferenceListener). |
void |
addCallPeerListener(CallPeerListener listener)
Registers the listener to the list of listeners that would be receiving CallPeerEvents. |
void |
addCallPeerSecurityListener(CallPeerSecurityListener listener)
Registers the listener to the list of listeners that would be receiving CallPeerSecurityEvents. |
void |
addConferenceMember(ConferenceMember conferenceMember)
Adds a specific ConferenceMember to the list of ConferenceMembers reported by this peer through getConferenceMembers() and getConferenceMemberCount()
and fires
CallPeerConferenceEvent#CONFERENCE_MEMBER_ADDED to
the currently registered CallPeerConferenceListeners. |
protected ConferenceMember |
findConferenceMember(long ssrc)
Returns the ConferenceMember with the specified ssrc ID or null if there is no such ConferenceMember. |
protected void |
fireCallPeerChangeEvent(String eventType,
Object oldValue,
Object newValue)
Constructs a CallPeerChangeEvent using this call peer as source, setting it to be of type eventType and the corresponding oldValue and newValue, |
protected void |
fireCallPeerChangeEvent(String eventType,
Object oldValue,
Object newValue,
String reason)
Constructs a CallPeerChangeEvent using this call peer as source, setting it to be of type eventType and the corresponding oldValue and newValue. |
protected void |
fireCallPeerChangeEvent(String eventType,
Object oldValue,
Object newValue,
String reason,
int reasonCode)
Constructs a CallPeerChangeEvent using this call peer as source, setting it to be of type eventType and the corresponding oldValue and newValue. |
protected void |
fireCallPeerConferenceEvent(CallPeerConferenceEvent conferenceEvent)
Fires a specific CallPeerConferenceEvent to the CallPeerConferenceListeners interested in changes in the conference-related information provided by this peer. |
protected void |
fireCallPeerSecurityMessageEvent(String messageType,
String i18nMessage,
int severity)
Constructs a CallPeerSecurityStatusEvent using this call peer as source, setting it to be of type eventType and the corresponding oldValue and newValue. |
protected void |
fireCallPeerSecurityOffEvent(CallPeerSecurityOffEvent evt)
Constructs a CallPeerSecurityStatusEvent using this call peer as source, setting it to be of type eventType and the corresponding oldValue and newValue. |
protected void |
fireCallPeerSecurityOnEvent(CallPeerSecurityOnEvent evt)
Constructs a CallPeerSecurityStatusEvent using this call peer as source, setting it to be of type eventType and the corresponding oldValue and newValue. |
abstract T |
getCall()
Returns a reference to the call that this peer belongs to. |
long |
getCallDurationStartTime()
Gets the time at which this CallPeer transitioned into a state (likely CallPeerState.CONNECTED) marking the start of the
duration of the participation in a Call. |
URL |
getCallInfoURL()
Returns a URL pointing ta a location with call control information for this peer or null if no such URL is available for this call peer. |
int |
getConferenceMemberCount()
Returns the count of the members contained in this peer. |
ConferenceMember[] |
getConferenceMembers()
Implements CallPeer#getConferenceMembers(). |
CallPeerSecurityStatusEvent |
getCurrentSecuritySettings()
Returns the currently used security settings of this CallPeer. |
abstract U |
getProtocolProvider()
Returns the protocol provider that this peer belongs to. |
CallPeerState |
getState()
Returns an object representing the current state of that peer. |
boolean |
isConferenceFocus()
Determines whether this call peer is currently a conference focus. |
boolean |
isMute()
Determines whether the audio stream (if any) being sent to this peer is mute. |
void |
removeCallPeerConferenceListener(CallPeerConferenceListener listener)
Implements CallPeer#removeCallPeerConferenceListener( CallPeerConferenceListener). |
void |
removeCallPeerListener(CallPeerListener listener)
Unregisters the specified listener. |
void |
removeCallPeerSecurityListener(CallPeerSecurityListener listener)
Unregisters the specified listener. |
void |
removeConferenceMember(ConferenceMember conferenceMember)
Removes a specific ConferenceMember from the list of ConferenceMembers reported by this peer through getConferenceMembers() and getConferenceMemberCount()
if it is contained and fires
CallPeerConferenceEvent#CONFERENCE_MEMBER_REMOVED to
the currently registered CallPeerConferenceListeners. |
void |
setConferenceFocus(boolean conferenceFocus)
Specifies whether this peer is a conference focus. |
void |
setMute(boolean newMuteValue)
Sets the mute property for this call peer. |
void |
setState(CallPeerState newState)
Causes this CallPeer to enter the specified state. |
void |
setState(CallPeerState newState,
String reason)
Causes this CallPeer to enter the specified state. |
void |
setState(CallPeerState newState,
String reason,
int reasonCode)
Causes this CallPeer to enter the specified state. |
String |
toString()
Returns a string representation of the peer in the form of Display Name <address>;status=CallPeerStatus |
| Methods inherited from class net.java.sip.communicator.util.PropertyChangeNotifier |
|---|
addPropertyChangeListener, firePropertyChange, getPropertyChangeSource, removePropertyChangeListener |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface net.java.sip.communicator.service.protocol.CallPeer |
|---|
addConferenceMembersSoundLevelListener, addPropertyChangeListener, addStreamSoundLevelListener, getAddress, getContact, getDisplayName, getImage, getPeerID, removeConferenceMembersSoundLevelListener, removePropertyChangeListener, removeStreamSoundLevelListener |
| Field Detail |
|---|
protected static final ConferenceMember[] NO_CONFERENCE_MEMBERS
protected final List<CallPeerListener> callPeerListeners
protected final List<CallPeerSecurityListener> callPeerSecurityListeners
protected final List<CallPeerConferenceListener> callPeerConferenceListeners
| Constructor Detail |
|---|
public AbstractCallPeer()
| Method Detail |
|---|
public void addCallPeerListener(CallPeerListener listener)
addCallPeerListener in interface CallPeerlistener - a listener instance to register with this peer.public void removeCallPeerListener(CallPeerListener listener)
removeCallPeerListener in interface CallPeerlistener - the listener to unregister.public void addCallPeerSecurityListener(CallPeerSecurityListener listener)
addCallPeerSecurityListener in interface CallPeerlistener - a listener instance to register with this peer.public void removeCallPeerSecurityListener(CallPeerSecurityListener listener)
removeCallPeerSecurityListener in interface CallPeerlistener - the listener to unregister.
protected void fireCallPeerChangeEvent(String eventType,
Object oldValue,
Object newValue)
eventType - the type of the event to create and dispatch.oldValue - the value of the source property before it changed.newValue - the current value of the source property.
protected void fireCallPeerChangeEvent(String eventType,
Object oldValue,
Object newValue,
String reason)
eventType - the type of the event to create and dispatch.oldValue - the value of the source property before it changed.newValue - the current value of the source property.reason - a string that could be set to contain a human readable
explanation for the transition (particularly handy when moving into a
FAILED state).
protected void fireCallPeerChangeEvent(String eventType,
Object oldValue,
Object newValue,
String reason,
int reasonCode)
eventType - the type of the event to create and dispatch.oldValue - the value of the source property before it changed.newValue - the current value of the source property.reason - a string that could be set to contain a human readable
explanation for the transition (particularly handy when moving into a
FAILED state).reasonCode - the reason code for the reason of this event.protected void fireCallPeerSecurityOnEvent(CallPeerSecurityOnEvent evt)
evt - the event object with details to pass on to the consumersprotected void fireCallPeerSecurityOffEvent(CallPeerSecurityOffEvent evt)
evt - the event object with details to pass on to the consumers
protected void fireCallPeerSecurityMessageEvent(String messageType,
String i18nMessage,
int severity)
messageType - the type of the messagei18nMessage - messageseverity - severity levelpublic String toString()
toString in interface CallPeertoString in class Objectpublic URL getCallInfoURL()
getCallInfoURL in interface CallPeerpublic CallPeerState getState()
getState in interface CallPeer
public void setState(CallPeerState newState,
String reason)
newState - the state this call peer should enter.reason - a string that could be set to contain a human readable
explanation for the transition (particularly handy when moving into a
FAILED state).
public void setState(CallPeerState newState,
String reason,
int reasonCode)
newState - the state this call peer should enter.reason - a string that could be set to contain a human readable
explanation for the transition (particularly handy when moving into a
FAILED state).reasonCode - the code for the reason of the state change.public void setState(CallPeerState newState)
newState - the state this call peer should enter.public long getCallDurationStartTime()
CallPeerState.CONNECTED) marking the start of the
duration of the participation in a Call.
getCallDurationStartTime in interface CallPeerCallPeer.CALL_DURATION_START_TIME_UNKNOWN if
such a transition has not been performedpublic boolean isMute()
The default implementation returns false.
isMute in interface CallPeerpublic void setMute(boolean newMuteValue)
newMuteValue - the new value of the mute property for this call peerpublic boolean isConferenceFocus()
isConferenceFocus in interface CallPeerpublic void setConferenceFocus(boolean conferenceFocus)
conferenceFocus - true if this peer is to become a
conference focus and false otherwise.public ConferenceMember[] getConferenceMembers()
getConferenceMembers in interface CallPeerpublic int getConferenceMemberCount()
Implements CallPeer#getConferenceMemberCount().
getConferenceMemberCount in interface CallPeerpublic void addConferenceMember(ConferenceMember conferenceMember)
getConferenceMembers() and getConferenceMemberCount()
and fires
CallPeerConferenceEvent#CONFERENCE_MEMBER_ADDED to
the currently registered CallPeerConferenceListeners.
conferenceMember - a ConferenceMember to be added to the
list of ConferenceMember reported by this peer. If the specified
ConferenceMember is already contained in the list, it is not
added again and no event is fired.public void removeConferenceMember(ConferenceMember conferenceMember)
getConferenceMembers() and getConferenceMemberCount()
if it is contained and fires
CallPeerConferenceEvent#CONFERENCE_MEMBER_REMOVED to
the currently registered CallPeerConferenceListeners.
conferenceMember - a ConferenceMember to be removed from
the list of ConferenceMember reported by this peer. If the
specified ConferenceMember is no contained in the list, no event
is fired.public void addCallPeerConferenceListener(CallPeerConferenceListener listener)
addCallPeerConferenceListener in interface CallPeerlistener - the CallPeerConferenceListener to addpublic void removeCallPeerConferenceListener(CallPeerConferenceListener listener)
removeCallPeerConferenceListener in interface CallPeerlistener - the CallPeerConferenceListener to removeprotected void fireCallPeerConferenceEvent(CallPeerConferenceEvent conferenceEvent)
conferenceEvent - a CallPeerConferenceEvent to be fired and
carrying the event dataprotected ConferenceMember findConferenceMember(long ssrc)
ssrc - the SSRC identifier of the RTP streams transmitted by the
ConferenceMember that we are looking for.
public CallPeerSecurityStatusEvent getCurrentSecuritySettings()
getCurrentSecuritySettings in interface CallPeerpublic abstract T getCall()
getCall in interface CallPeerpublic abstract U getProtocolProvider()
getProtocolProvider in interface CallPeer
|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||