Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.service.protocol.media
Class CallPeerMediaHandler<T extends MediaAwareCallPeer<?,?,?>>

java.lang.Object
  extended by net.java.sip.communicator.util.event.PropertyChangeNotifier
      extended by net.java.sip.communicator.service.protocol.media.CallPeerMediaHandler<T>
Type Parameters:
T - the peer extension class like for example CallPeerSipImpl or CallPeerJabberImpl
Direct Known Subclasses:
CallPeerMediaHandlerGTalkImpl, CallPeerMediaHandlerJabberImpl, CallPeerMediaHandlerSipImpl

public abstract class CallPeerMediaHandler<T extends MediaAwareCallPeer<?,?,?>>
extends PropertyChangeNotifier

A utility class implementing media control code shared between current telephony implementations. This class is only meant for use by protocol implementations and should not be accessed by bundles that are simply using the telephony functionalities.

Author:
Emil Ivov, Lyubomir Marinov

Field Summary
static String AUDIO_LOCAL_SSRC
          The name of the CallPeerMediaHandler property which specifies the local SSRC of its audio MediaStream.
static String AUDIO_REMOTE_SSRC
          The name of the CallPeerMediaHandler property which specifies the remote SSRC of its audio MediaStream.
static long SSRC_UNKNOWN
          The constant which signals that a SSRC value is unknown.
static String VIDEO_LOCAL_SSRC
          The name of the CallPeerMediaHandler property which specifies the local SSRC of its video MediaStream.
static String VIDEO_REMOTE_SSRC
          The name of the CallPeerMediaHandler property which specifies the remote SSRC of its video MediaStream.
 
Constructor Summary
CallPeerMediaHandler(T peer, SrtpListener srtpListener)
          Creates a new handler that will be managing media streams for peer.
 
Method Summary
 void addAdvertisedEncryptionMethod(SrtpControlType encryptionMethod)
          Adds encryption method to the list of advertised secure methods.
 void addVideoListener(VideoListener listener)
          Registers a specific VideoListener with this instance so that it starts receiving notifications from it about changes in the availability of visual Components displaying video.
 void close()
          Closes and null-ifies all streams and connectors and readies this media handler for garbage collection (or reuse).
protected  void closeStream(MediaType mediaType)
          Closes the MediaStream that this instance uses for a specific MediaType and prepares it for garbage collection.
 Component createLocalVisualComponent()
          Gets local visual Component of the local peer.
 void disposeLocalVisualComponent(Component component)
          Disposes of a specific local visual Component of the local peer.
protected  MediaFormat findMediaFormat(List<MediaFormat> formats, MediaFormat format)
          Finds a MediaFormat in a specific list of MediaFormats which matches a specific MediaFormat.
protected  boolean fireVideoEvent(int type, Component visualComponent, int origin)
          Notifies the VideoListeners registered with this CallPeerMediaHandler about a specific type of change in the availability of a specific visual Component depicting video.
 void fireVideoEvent(VideoEvent event)
          Notifies the VideoListeners registered with this CallPeerMediaHandler about a specific VideoEvent.
 SrtpControlType[] getAdvertisedEncryptionMethods()
          Returns the advertised methods for securing the call, this are the methods like SDES, ZRTP that are indicated in the initial session initialization.
 long getAudioRemoteSSRC()
          Gets the last-known remote SSRC of the audio MediaStream of this instance.
protected  MediaDevice getDefaultDevice(MediaType mediaType)
          Gets a MediaDevice which is capable of capture and/or playback of media of the specified MediaType, is the default choice of the user for a MediaDevice with the specified MediaType and is appropriate for the current states of the associated CallPeer and Call.
protected  MediaDirection getDirectionUserPreference(MediaType mediaType)
          Gets the MediaDirection value which represents the preference of the user with respect to streaming media of the specified MediaType.
protected  DynamicPayloadTypeRegistry getDynamicPayloadTypes()
          Returns the DynamicPayloadTypeRegistry instance we are currently using.
 SrtpControlType getEncryptionMethod(MediaType mediaType)
          Gets the SRTP control type used for a given media type.
protected  List<RTPExtension> getExtensionsForType(MediaType type)
          Returns a (possibly empty) List of RTPExtensions supported by the device that this media handler uses to handle media of the specified type.
 String getICECandidateExtendedType()
          Returns the extended type of the candidate selected if this transport manager is using ICE.
 String getICEState()
          Returns the current state of ICE processing.
 MediaHandler getMediaHandler()
           
 T getPeer()
          Returns the peer that is this media handler's "raison d'etre".
protected  DynamicRTPExtensionsRegistry getRtpExtensionsRegistry()
          Returns the DynamicRTPExtensionsRegistry instance we are currently using.
protected  Map<MediaTypeSrtpControl,SrtpControl> getSrtpControls()
          Gets the SrtpControls of the MediaStreams of this instance.
 MediaStream getStream(MediaType mediaType)
          Gets the MediaStream of this CallPeerMediaHandler which is of a specific MediaType.
protected abstract  TransportManager<T> getTransportManager()
          Gets the TransportManager implementation handling our address management.
 Component getVisualComponent()
          Deprecated. 
 List<Component> getVisualComponents()
          Gets the visual Components in which videos from the remote peer are currently being rendered.
protected  MediaStream initStream(StreamConnector connector, MediaDevice device, MediaFormat format, MediaStreamTarget target, MediaDirection direction, List<RTPExtension> rtpExtensions, boolean masterStream)
          Creates if necessary, and configures the stream that this MediaHandler is using for the MediaType matching the one of the MediaDevice.
protected  List<MediaFormat> intersectFormats(List<MediaFormat> remoteFormats, List<MediaFormat> localFormats)
          Compares a list of MediaFormats offered by a remote party to the list of locally supported RTPExtensions as returned by one of our local MediaDevices and returns a third List that contains their intersection.
protected  List<RTPExtension> intersectRTPExtensions(List<RTPExtension> remoteExtensions, List<RTPExtension> supportedExtensions)
          Compares a list of RTPExtensions offered by a remote party to the list of locally supported RTPExtensions as returned by one of our local MediaDevices and returns a third List that contains their intersection.
 boolean isLocalAudioTransmissionEnabled()
          Determines whether this media handler is currently set to transmit local audio.
 boolean isLocallyOnHold()
          Determines whether this handler's streams have been placed on hold.
 boolean isLocalVideoTransmissionEnabled()
          Determines whether this media handler is currently set to transmit local video.
 boolean isMute()
          Determines whether the audio stream of this media handler is currently on mute.
 boolean isRemotelyOnHold()
          Determines whether the remote party has placed all our streams on hold.
 boolean isSecure()
          Returns the secure state of the call.
 boolean processKeyFrameRequest()
          Processes a request for a (video) key frame from the remote peer to the local peer.
(package private)  void registerAudioLevelListeners(AudioMediaStream audioStream)
          Registers all audio level listeners currently known to this media handler with the specified audioStream.
 void removeVideoListener(VideoListener listener)
          Unregisters a specific VideoListener from this instance so that it stops receiving notifications from it about changes in the availability of visual Components displaying video.
protected  boolean requestKeyFrame()
          Requests a key frame from the remote peer of the associated VideoMediaStream of this CallPeerMediaHandler.
protected  void sendHolePunchPacket(MediaStreamTarget target)
          Sends empty UDP packets to target destination data/control ports in order to open port on NAT or RTP proxy if any.
 void setCsrcAudioLevelListener(CsrcAudioLevelListener csrcAudioLevelListener)
          Sets csrcAudioLevelListener as the listener that will be receiving notifications for changes in the audio levels of the remote participants that our peer is mixing.
 void setLocalAudioTransmissionEnabled(boolean enabled)
          Specifies whether this media handler should be allowed to transmit local audio.
 void setLocallyOnHold(boolean locallyOnHold)
          Puts all MediaStreams in this handler locally on or off hold (according to the value of locallyOnHold).
 void setLocalUserAudioLevelListener(SimpleAudioLevelListener listener)
          If the local AudioMediaStream has already been created, sets listener as the SimpleAudioLevelListener that it should notify for local user level events.
 void setLocalVideoTransmissionEnabled(boolean enabled)
          Specifies whether this media handler should be allowed to transmit local video.
 void setMediaHandler(MediaHandler mediaHandler)
           
 void setMute(boolean mute)
          Causes this handler's AudioMediaStream to stop transmitting the audio being fed from this stream's MediaDevice and transmit silence instead.
 void setStreamAudioLevelListener(SimpleAudioLevelListener listener)
          If the local AudioMediaStream has already been created, sets listener as the SimpleAudioLevelListener that it should notify for stream user level events.
 void start()
          Starts this CallPeerMediaHandler.
 void startSrtpMultistream(SrtpControl master)
          Passes multiStreamData to the video stream that we are using in this media handler (if any) so that the underlying SRTP lib could properly handle stream security.
protected abstract  void throwOperationFailedException(String message, int errorCode, Throwable cause)
          Lets the underlying implementation take note of this error and only then throws it to the using bundles.
 
Methods inherited from class net.java.sip.communicator.util.event.PropertyChangeNotifier
addPropertyChangeListener, firePropertyChange, getPropertyChangeSource, removePropertyChangeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

AUDIO_LOCAL_SSRC

public static final String AUDIO_LOCAL_SSRC
The name of the CallPeerMediaHandler property which specifies the local SSRC of its audio MediaStream.

See Also:
Constant Field Values

AUDIO_REMOTE_SSRC

public static final String AUDIO_REMOTE_SSRC
The name of the CallPeerMediaHandler property which specifies the remote SSRC of its audio MediaStream.

See Also:
Constant Field Values

SSRC_UNKNOWN

public static final long SSRC_UNKNOWN
The constant which signals that a SSRC value is unknown.

See Also:
Constant Field Values

VIDEO_LOCAL_SSRC

public static final String VIDEO_LOCAL_SSRC
The name of the CallPeerMediaHandler property which specifies the local SSRC of its video MediaStream.

See Also:
Constant Field Values

VIDEO_REMOTE_SSRC

public static final String VIDEO_REMOTE_SSRC
The name of the CallPeerMediaHandler property which specifies the remote SSRC of its video MediaStream.

See Also:
Constant Field Values
Constructor Detail

CallPeerMediaHandler

public CallPeerMediaHandler(T peer,
                            SrtpListener srtpListener)
Creates a new handler that will be managing media streams for peer.

Parameters:
peer - that CallPeer instance that we will be managing media for.
srtpListener - the object that receives SRTP security events.
Method Detail

setLocallyOnHold

public void setLocallyOnHold(boolean locallyOnHold)
Puts all MediaStreams in this handler locally on or off hold (according to the value of locallyOnHold). This would also be taken into account when the next update offer is generated.

Parameters:
locallyOnHold - true if we are to make our audio stream stop transmitting and false if we are to start transmitting again.

close

public void close()
Closes and null-ifies all streams and connectors and readies this media handler for garbage collection (or reuse). Synchronized if any other stream operations are in process we won't interrupt them.


closeStream

protected void closeStream(MediaType mediaType)
Closes the MediaStream that this instance uses for a specific MediaType and prepares it for garbage collection.

Parameters:
mediaType - the MediaType that we'd like to stop a stream for.

isLocallyOnHold

public boolean isLocallyOnHold()
Determines whether this handler's streams have been placed on hold.

Returns:
true if this handler's streams have been placed on hold and false otherwise.

setMute

public void setMute(boolean mute)
Causes this handler's AudioMediaStream to stop transmitting the audio being fed from this stream's MediaDevice and transmit silence instead.

Parameters:
mute - true if we are to make our audio stream start transmitting silence and false if we are to end the transmission of silence and use our stream's MediaDevice again.

isMute

public boolean isMute()
Determines whether the audio stream of this media handler is currently on mute.

Returns:
true if local audio transmission is currently on mute and false otherwise.

getDirectionUserPreference

protected MediaDirection getDirectionUserPreference(MediaType mediaType)
Gets the MediaDirection value which represents the preference of the user with respect to streaming media of the specified MediaType.

Parameters:
mediaType - the MediaType to retrieve the user preference for
Returns:
a MediaDirection value which represents the preference of the user with respect to streaming media of the specified mediaType

setLocalVideoTransmissionEnabled

public void setLocalVideoTransmissionEnabled(boolean enabled)
Specifies whether this media handler should be allowed to transmit local video.

Parameters:
enabled - true if the media handler should transmit local video and false otherwise.

isLocalVideoTransmissionEnabled

public boolean isLocalVideoTransmissionEnabled()
Determines whether this media handler is currently set to transmit local video.

Returns:
true if the media handler is set to transmit local video and false otherwise.

setLocalAudioTransmissionEnabled

public void setLocalAudioTransmissionEnabled(boolean enabled)
Specifies whether this media handler should be allowed to transmit local audio.

Parameters:
enabled - true if the media handler should transmit local audio and false otherwise.

isLocalAudioTransmissionEnabled

public boolean isLocalAudioTransmissionEnabled()
Determines whether this media handler is currently set to transmit local audio.

Returns:
true if the media handler is set to transmit local audio and false otherwise.

isSecure

public boolean isSecure()
Returns the secure state of the call. If both audio and video is secured.

Returns:
the call secure state

getAdvertisedEncryptionMethods

public SrtpControlType[] getAdvertisedEncryptionMethods()
Returns the advertised methods for securing the call, this are the methods like SDES, ZRTP that are indicated in the initial session initialization. Missing here doesn't mean the other party don't support it.

Returns:
the advertised encryption methods.

addAdvertisedEncryptionMethod

public void addAdvertisedEncryptionMethod(SrtpControlType encryptionMethod)
Adds encryption method to the list of advertised secure methods.

Parameters:
encryptionMethod - the method to add.

startSrtpMultistream

public void startSrtpMultistream(SrtpControl master)
Passes multiStreamData to the video stream that we are using in this media handler (if any) so that the underlying SRTP lib could properly handle stream security.

Parameters:
master - the data that we are supposed to pass to our video stream.

getAudioRemoteSSRC

public long getAudioRemoteSSRC()
Gets the last-known remote SSRC of the audio MediaStream of this instance.

Returns:
the last-known remote SSRC of the audio MediaStream of this instance

getDefaultDevice

protected MediaDevice getDefaultDevice(MediaType mediaType)
Gets a MediaDevice which is capable of capture and/or playback of media of the specified MediaType, is the default choice of the user for a MediaDevice with the specified MediaType and is appropriate for the current states of the associated CallPeer and Call.

For example, when the local peer is acting as a conference focus in the Call of the associated CallPeer, the audio device must be a mixer.

Parameters:
mediaType - the MediaType in which the retrieved MediaDevice is to capture and/or play back media
Returns:
a MediaDevice which is capable of capture and/or playback of media of the specified mediaType, is the default choice of the user for a MediaDevice with the specified mediaType and is appropriate for the current states of the associated CallPeer and Call

addVideoListener

public void addVideoListener(VideoListener listener)
Registers a specific VideoListener with this instance so that it starts receiving notifications from it about changes in the availability of visual Components displaying video.

Parameters:
listener - the VideoListener to be registered with this instance and to start receiving notifications from it about changes in the availability of visual Components displaying video

fireVideoEvent

protected boolean fireVideoEvent(int type,
                                 Component visualComponent,
                                 int origin)
Notifies the VideoListeners registered with this CallPeerMediaHandler about a specific type of change in the availability of a specific visual Component depicting video.

Parameters:
type - the type of change as defined by VideoEvent in the availability of the specified visual Component depicting video
visualComponent - the visual Component depicting video which has been added or removed in this CallPeerMediaHandler
origin - VideoEvent.LOCAL if the origin of the video is local (e.g. it is being locally captured); VideoEvent.REMOTE if the origin of the video is remote (e.g. a remote peer is streaming it)
Returns:
true if this event and, more specifically, the visual Component it describes have been consumed and should be considered owned, referenced (which is important because Components belong to a single Container at a time); otherwise, false

fireVideoEvent

public void fireVideoEvent(VideoEvent event)
Notifies the VideoListeners registered with this CallPeerMediaHandler about a specific VideoEvent.

Parameters:
event - the VideoEvent to fire to the VideoListeners registered with this CallPeerMediaHandler

createLocalVisualComponent

public Component createLocalVisualComponent()
Gets local visual Component of the local peer.

Returns:
visual Component

disposeLocalVisualComponent

public void disposeLocalVisualComponent(Component component)
Disposes of a specific local visual Component of the local peer.

Parameters:
component - the local visual Component of the local peer to dispose of

getVisualComponent

@Deprecated
public Component getVisualComponent()
Deprecated. 

Gets the visual Component in which video from the remote peer is currently being rendered or null if there is currently no video streaming from the remote peer.

Returns:
the visual Component in which video from the remote peer is currently being rendered or null if there is currently no video streaming from the remote peer

getVisualComponents

public List<Component> getVisualComponents()
Gets the visual Components in which videos from the remote peer are currently being rendered.

Returns:
the visual Components in which videos from the remote peer are currently being rendered

removeVideoListener

public void removeVideoListener(VideoListener listener)
Unregisters a specific VideoListener from this instance so that it stops receiving notifications from it about changes in the availability of visual Components displaying video.

Parameters:
listener - the VideoListener to be unregistered from this instance and to stop receiving notifications from it about changes in the availability of visual Components displaying video

setLocalUserAudioLevelListener

public void setLocalUserAudioLevelListener(SimpleAudioLevelListener listener)
If the local AudioMediaStream has already been created, sets listener as the SimpleAudioLevelListener that it should notify for local user level events. Otherwise stores a reference to listener so that we could add it once we create the stream.

Parameters:
listener - the SimpleAudioLevelListener to add or null if we are trying to remove it.

setStreamAudioLevelListener

public void setStreamAudioLevelListener(SimpleAudioLevelListener listener)
If the local AudioMediaStream has already been created, sets listener as the SimpleAudioLevelListener that it should notify for stream user level events. Otherwise stores a reference to listener so that we could add it once we create the stream.

Parameters:
listener - the SimpleAudioLevelListener to add or null if we are trying to remove it.

setCsrcAudioLevelListener

public void setCsrcAudioLevelListener(CsrcAudioLevelListener csrcAudioLevelListener)
Sets csrcAudioLevelListener as the listener that will be receiving notifications for changes in the audio levels of the remote participants that our peer is mixing.

Parameters:
csrcAudioLevelListener - the CsrcAudioLevelListener to set to our audio streams.

getSrtpControls

protected Map<MediaTypeSrtpControl,SrtpControl> getSrtpControls()
Gets the SrtpControls of the MediaStreams of this instance.

Returns:
the SrtpControls of the MediaStreams of this instance

initStream

protected MediaStream initStream(StreamConnector connector,
                                 MediaDevice device,
                                 MediaFormat format,
                                 MediaStreamTarget target,
                                 MediaDirection direction,
                                 List<RTPExtension> rtpExtensions,
                                 boolean masterStream)
                          throws OperationFailedException
Creates if necessary, and configures the stream that this MediaHandler is using for the MediaType matching the one of the MediaDevice.

Parameters:
connector - the MediaConnector that we'd like to bind the newly created stream to.
device - the MediaDevice that we'd like to attach the newly created MediaStream to.
format - the MediaFormat that we'd like the new MediaStream to be set to transmit in.
target - the MediaStreamTarget containing the RTP and RTCP address:port couples that the new stream would be sending packets to.
direction - the MediaDirection that we'd like the new stream to use (i.e. sendonly, sendrecv, recvonly, or inactive).
rtpExtensions - the list of RTPExtensions that should be enabled for this stream.
masterStream - whether the stream to be used as master if secured
Returns:
the newly created MediaStream.
Throws:
OperationFailedException - if creating the stream fails for any reason (like, for example, accessing the device or setting the format).

requestKeyFrame

protected boolean requestKeyFrame()
Requests a key frame from the remote peer of the associated VideoMediaStream of this CallPeerMediaHandler. The default implementation provided by CallPeerMediaHandler always returns false.

Returns:
true if this CallPeerMediaHandler has indeed requested a key frame from the remote peer of its associated VideoMediaStream in response to the call; otherwise, false

sendHolePunchPacket

protected void sendHolePunchPacket(MediaStreamTarget target)
Sends empty UDP packets to target destination data/control ports in order to open port on NAT or RTP proxy if any. In order to be really efficient, this method should be called after we send our offer or answer.

Parameters:
target - MediaStreamTarget

processKeyFrameRequest

public boolean processKeyFrameRequest()
Processes a request for a (video) key frame from the remote peer to the local peer.

Returns:
true if the request for a (video) key frame has been honored by the local peer; otherwise, false

registerAudioLevelListeners

void registerAudioLevelListeners(AudioMediaStream audioStream)
Registers all audio level listeners currently known to this media handler with the specified audioStream.

Parameters:
audioStream - the AudioMediaStream that we'd like to register our audio level listeners with.

getStream

public MediaStream getStream(MediaType mediaType)
Gets the MediaStream of this CallPeerMediaHandler which is of a specific MediaType. If this instance doesn't have such a MediaStream, returns null

Parameters:
mediaType - the MediaType of the MediaStream to retrieve
Returns:
the MediaStream of this CallPeerMediaHandler which is of the specified mediaType if this instance has such a MediaStream; otherwise, null

isRemotelyOnHold

public boolean isRemotelyOnHold()
Determines whether the remote party has placed all our streams on hold.

Returns:
true if all our streams have been placed on hold (i.e. if none of them is currently sending and false otherwise.

intersectFormats

protected List<MediaFormat> intersectFormats(List<MediaFormat> remoteFormats,
                                             List<MediaFormat> localFormats)
Compares a list of MediaFormats offered by a remote party to the list of locally supported RTPExtensions as returned by one of our local MediaDevices and returns a third List that contains their intersection.

Parameters:
remoteFormats - remote MediaFormat found in the SDP message
localFormats - local supported MediaFormat of our device
Returns:
intersection between our local and remote MediaFormat

findMediaFormat

protected MediaFormat findMediaFormat(List<MediaFormat> formats,
                                      MediaFormat format)
Finds a MediaFormat in a specific list of MediaFormats which matches a specific MediaFormat.

Parameters:
formats - the list of MediaFormats to find the specified matching MediaFormat into
format - encoding of the MediaFormat to find
Returns:
the MediaFormat from formats which matches format if such a match exists in formats; otherwise, null

intersectRTPExtensions

protected List<RTPExtension> intersectRTPExtensions(List<RTPExtension> remoteExtensions,
                                                    List<RTPExtension> supportedExtensions)
Compares a list of RTPExtensions offered by a remote party to the list of locally supported RTPExtensions as returned by one of our local MediaDevices and returns a third List that contains their intersection. The returned List contains extensions supported by both the remote party and the local device that we are dealing with. Direction attributes of both lists are also intersected and the returned RTPExtensions have directions valid from a local perspective. In other words, if remoteExtensions contains an extension that the remote party supports in a SENDONLY mode, and we support that extension in a SENDRECV mode, the corresponding entry in the returned list will have a RECVONLY direction.

Parameters:
remoteExtensions - the List of RTPExtensions as advertised by the remote party.
supportedExtensions - the List of RTPExtensions that a local MediaDevice returned as supported.
Returns:
the (possibly empty) intersection of both of the extensions lists in a form that can be used for generating an SDP media description or for configuring a stream.

getExtensionsForType

protected List<RTPExtension> getExtensionsForType(MediaType type)
Returns a (possibly empty) List of RTPExtensions supported by the device that this media handler uses to handle media of the specified type.

Parameters:
type - the MediaType of the device whose RTPExtensions we are interested in.
Returns:
a (possibly empty) List of RTPExtensions supported by the device that this media handler uses to handle media of the specified type.

getDynamicPayloadTypes

protected DynamicPayloadTypeRegistry getDynamicPayloadTypes()
Returns the DynamicPayloadTypeRegistry instance we are currently using.

Returns:
the DynamicPayloadTypeRegistry instance we are currently using.

getRtpExtensionsRegistry

protected DynamicRTPExtensionsRegistry getRtpExtensionsRegistry()
Returns the DynamicRTPExtensionsRegistry instance we are currently using.

Returns:
the DynamicRTPExtensionsRegistry instance we are currently using.

start

public void start()
           throws IllegalStateException
Starts this CallPeerMediaHandler. If it has already been started, does nothing.

Throws:
IllegalStateException - if this method is called without this handler having first seen a media description or having generated an offer.

getPeer

public T getPeer()
Returns the peer that is this media handler's "raison d'etre".

Returns:
the MediaAwareCallPeer that this handler is servicing.

throwOperationFailedException

protected abstract void throwOperationFailedException(String message,
                                                      int errorCode,
                                                      Throwable cause)
                                               throws OperationFailedException
Lets the underlying implementation take note of this error and only then throws it to the using bundles.

Parameters:
message - the message to be logged and then wrapped in a new OperationFailedException
errorCode - the error code to be assigned to the new OperationFailedException
cause - the Throwable that has caused the necessity to log an error and have a new OperationFailedException thrown
Throws:
OperationFailedException - the exception that we wanted this method to throw.

getTransportManager

protected abstract TransportManager<T> getTransportManager()
Gets the TransportManager implementation handling our address management.

Returns:
the TransportManager implementation handling our address management

getEncryptionMethod

public SrtpControlType getEncryptionMethod(MediaType mediaType)
Gets the SRTP control type used for a given media type.

Parameters:
mediaType - the MediaType to get the SRTP control type for
Returns:
the SRTP control type (MIKEY, SDES, ZRTP) used for the given media type or null if SRTP is not enabled for the given media type

getICECandidateExtendedType

public String getICECandidateExtendedType()
Returns the extended type of the candidate selected if this transport manager is using ICE.

Returns:
The extended type of the candidate selected if this transport manager is using ICE. Otherwise, returns null.

getICEState

public String getICEState()
Returns the current state of ICE processing.

Returns:
the current state of ICE processing if this transport manager is using ICE. Otherwise, returns null.

getMediaHandler

public MediaHandler getMediaHandler()

setMediaHandler

public void setMediaHandler(MediaHandler mediaHandler)

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

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