|
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,V>
net.java.sip.communicator.service.protocol.media.MediaAwareCallPeer<T,U,V>
T - the peer extension class like for example CallSipImpl
or CallJabberImplU - the media handler extension class like for example
CallPeerMediaHandlerSipImpl or
CallPeerMediaHandlerJabberImplV - the provider extension class like for example
ProtocolProviderServiceSipImpl or
ProtocolProviderServiceJabberImplpublic abstract class MediaAwareCallPeer<T extends MediaAwareCall<?,?,V>,U extends CallPeerMediaHandler<?>,V extends ProtocolProviderService>
A utility class implementing media control code shared between current telephony implementations. This class is only meant for use by protocol implementations and should/could not be accessed by bundles that are simply using the telephony functionalities.
| Field Summary |
|---|
| Fields inherited from class net.java.sip.communicator.service.protocol.AbstractCallPeer |
|---|
callPeerConferenceListeners, callPeerListeners, callPeerSecurityListeners, NO_CONFERENCE_MEMBERS |
| Fields inherited from interface net.java.sip.communicator.service.neomedia.event.SimpleAudioLevelListener |
|---|
MAX_LEVEL, MIN_LEVEL |
| Fields inherited from interface net.java.sip.communicator.service.protocol.CallPeer |
|---|
CALL_DURATION_START_TIME_UNKNOWN, MUTE_PROPERTY_NAME |
| Constructor Summary | |
|---|---|
MediaAwareCallPeer(T owningCall)
Creates a new call peer with address peerAddress. |
|
| Method Summary | |
|---|---|
void |
addConferenceMembersSoundLevelListener(ConferenceMembersSoundLevelListener listener)
Adds a specific ConferenceMembersSoundLevelListener to the list of listeners interested in and notified about changes in conference members sound level. |
void |
addStreamSoundLevelListener(SoundLevelListener listener)
Adds a specific SoundLevelListener to the list of listeners interested in and notified about changes in the sound level of the audio sent by the remote party. |
void |
addVideoPropertyChangeListener(PropertyChangeListener listener)
Adds a specific PropertyChangeListener to the list of listeners which get notified when the properties (e.g. |
void |
audioLevelChanged(int newLevel)
Notified by its very majesty the media service about changes in the audio level of the stream coming from this peer, this method generates the corresponding events and delivers them to the listeners that have registered here. |
void |
audioLevelsReceived(long[] audioLevels)
Implements CsrcAudioLevelListener.audioLevelsReceived(long[])
so that we could deliver to ConferenceMembersSoundLevelListeners
the events corresponding to the audio level changes that are being
reported here. |
void |
callPeerAdded(CallPeerEvent evt)
Does nothing. |
void |
callPeerRemoved(CallPeerEvent evt)
Does nothing. |
void |
conferenceFocusChanged(CallPeerConferenceEvent evt)
Dummy implementation of #conferenceFocusChanged(CallPeerConferenceEvent). |
void |
conferenceMemberAdded(CallPeerConferenceEvent conferenceEvent)
Called when this peer becomes a mixer. |
void |
conferenceMemberRemoved(CallPeerConferenceEvent conferenceEvent)
Called when this peer stops being a mixer. |
T |
getCall()
Returns a reference to the call that this peer belongs to. |
byte[] |
getImage()
The method returns an image representation of the call peer if one is available. |
U |
getMediaHandler()
Returns a reference to the CallPeerMediaHandler used by this peer. |
String |
getPeerID()
Returns a unique identifier representing this peer. |
V |
getProtocolProvider()
Returns the protocol provider that this peer belongs to. |
boolean |
isLocalVideoStreaming()
Determines whether we are currently streaming video toward whoever this CallPeerSipImpl represents. |
boolean |
isMute()
Determines whether the audio stream (if any) being sent to this peer is mute. |
void |
logAndFail(String message,
Throwable throwable)
Logs message and cause and sets this peer's state to CallPeerState.FAILED |
void |
reevalLocalHoldStatus()
Updates the state of this CallPeer to match the locally-on-hold status of our media handler. |
void |
reevalRemoteHoldStatus()
Updates the state of this CallPeer to match the remotely-on-hold status of our media handler. |
void |
removeConferenceMembersSoundLevelListener(ConferenceMembersSoundLevelListener listener)
Removes a specific ConferenceMembersSoundLevelListener of the list of listeners interested in and notified about changes in conference members sound level. |
void |
removeStreamSoundLevelListener(SoundLevelListener listener)
Removes a specific SoundLevelListener of the list of listeners interested in and notified about changes in stream sound level related information. |
void |
removeVideoPropertyChangeListener(PropertyChangeListener listener)
Removes a specific PropertyChangeListener from the list of listeners which get notified when the properties (e.g. |
void |
securityMessageReceived(String messageType,
String i18nMessage,
int severity)
Sets the security message associated with a failure/warning or information coming from the encryption protocol. |
void |
securityTurnedOff(int sessionType)
Sets the security status to OFF for this call peer. |
void |
securityTurnedOn(int sessionType,
String cipher,
SrtpControl sender)
Sets the security status to ON for this call peer. |
void |
setCall(T call)
Sets the call containing this peer. |
void |
setImage(byte[] image)
Sets the byte array containing an image representation (photo or picture) of the call peer. |
void |
setLocalVideoAllowed(boolean allowed)
Modifies the local media setup to reflect the requested setting for the streaming of the local video and then re-invites the peer represented by this class using a corresponding SDP description.. |
protected void |
setMediaHandler(U mediaHandler)
Sets a reference to the CallPeerMediaHandler used by this peer. |
void |
setMute(boolean newMuteValue)
Sets the mute property for this call peer. |
void |
setPeerID(String peerID)
Sets the String that serves as a unique identifier of this CallPeer. |
void |
setState(CallPeerState newState,
String reason,
int reasonCode)
Overrides the parent set state method in order to make sure that we close our media handler whenever we enter a disconnected state. |
| 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 |
|---|
addPropertyChangeListener, getAddress, getContact, getDisplayName, getURI, removePropertyChangeListener |
| Constructor Detail |
|---|
public MediaAwareCallPeer(T owningCall)
owningCall - the call that contains this call peer.| Method Detail |
|---|
public byte[] getImage()
getImage in interface CallPeerpublic void setImage(byte[] image)
image - a byte array containing the imagepublic String getPeerID()
getPeerID in interface CallPeerpublic void setPeerID(String peerID)
peerID - the ID of this call peer.public T getCall()
getCall in interface CallPeergetCall in class AbstractCallPeer<T extends MediaAwareCall<?,?,V>,V extends ProtocolProviderService>public void setCall(T call)
call - the call that this call peer is participating in.public V getProtocolProvider()
getProtocolProvider in interface CallPeergetProtocolProvider in class AbstractCallPeer<T extends MediaAwareCall<?,?,V>,V extends ProtocolProviderService>public boolean isMute()
isMute in interface CallPeerisMute in class AbstractCallPeer<T extends MediaAwareCall<?,?,V>,V extends ProtocolProviderService>public void reevalRemoteHoldStatus()
public void reevalLocalHoldStatus()
public void setMute(boolean newMuteValue)
setMute in class AbstractCallPeer<T extends MediaAwareCall<?,?,V>,V extends ProtocolProviderService>newMuteValue - the new value of the mute property for this call peer
public void logAndFail(String message,
Throwable throwable)
message - a message to log and display to the user.throwable - the exception that cause the error we are logging
public void setLocalVideoAllowed(boolean allowed)
throws OperationFailedException
allowed - true if local video transmission is allowed and
false otherwise.
OperationFailedException - if video initialization fails.public boolean isLocalVideoStreaming()
public void addVideoPropertyChangeListener(PropertyChangeListener listener)
listener - the PropertyChangeListener to be notified
when the properties associated with the specified Call change
their valuespublic void removeVideoPropertyChangeListener(PropertyChangeListener listener)
listener - the PropertyChangeListener to no longer be
notified when the properties associated with the specified Call
change their values
public void setState(CallPeerState newState,
String reason,
int reasonCode)
setState in class AbstractCallPeer<T extends MediaAwareCall<?,?,V>,V extends ProtocolProviderService>newState - the CallPeerState that we are about to enter and
that we pass to our predecessor.reason - a reason phrase explaining the state (e.g. if newState
indicates a failure) and that we pass to our predecessor.reasonCode - the code for the reason of the state change.public void addStreamSoundLevelListener(SoundLevelListener listener)
addStreamSoundLevelListener in interface CallPeerlistener - the SoundLevelListener to addpublic void removeStreamSoundLevelListener(SoundLevelListener listener)
removeStreamSoundLevelListener in interface CallPeerlistener - the SoundLevelListener to removepublic void addConferenceMembersSoundLevelListener(ConferenceMembersSoundLevelListener listener)
addConferenceMembersSoundLevelListener in interface CallPeerlistener - the ConferenceMembersSoundLevelListener to addpublic void removeConferenceMembersSoundLevelListener(ConferenceMembersSoundLevelListener listener)
removeConferenceMembersSoundLevelListener in interface CallPeerlistener - the ConferenceMembersSoundLevelListener to
removepublic void audioLevelsReceived(long[] audioLevels)
CsrcAudioLevelListener.audioLevelsReceived(long[])
so that we could deliver to ConferenceMembersSoundLevelListeners
the events corresponding to the audio level changes that are being
reported here.
audioLevelsReceived in interface CsrcAudioLevelListeneraudioLevels - the levels that we need to dispatch to all registered
ConferenceMemberSoundLevelListeners.public void callPeerAdded(CallPeerEvent evt)
evt - the event.public void callPeerRemoved(CallPeerEvent evt)
evt - the event.
public void securityTurnedOn(int sessionType,
String cipher,
SrtpControl sender)
securityTurnedOn in interface SrtpListenersessionType - the type of the call session - audio or video.cipher - the ciphersender - the security controller that caused the eventpublic void securityTurnedOff(int sessionType)
securityTurnedOff in interface SrtpListenersessionType - the type of the call session - audio or video.
public void securityMessageReceived(String messageType,
String i18nMessage,
int severity)
securityMessageReceived in interface SrtpListenermessageType - the type of the message.i18nMessage - the messageseverity - severity levelpublic void conferenceFocusChanged(CallPeerConferenceEvent evt)
#conferenceFocusChanged(CallPeerConferenceEvent).
conferenceFocusChanged in interface CallPeerConferenceListenerevt - ignoredpublic void conferenceMemberAdded(CallPeerConferenceEvent conferenceEvent)
conferenceMemberAdded in interface CallPeerConferenceListenerconferenceEvent - the event containing information (that we don't
really use) on the newly add member.public void conferenceMemberRemoved(CallPeerConferenceEvent conferenceEvent)
conferenceMemberRemoved in interface CallPeerConferenceListenerconferenceEvent - the event containing information (that we don't
really use) on the freshly removed member.public void audioLevelChanged(int newLevel)
audioLevelChanged in interface SimpleAudioLevelListenernewLevel - the new audio level of the local user.public U getMediaHandler()
protected void setMediaHandler(U mediaHandler)
mediaHandler - a reference to the CallPeerMediaHandler
instance that this peer uses for media related tips and tricks.
|
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 | |||||||||