public class RtpConnectionImpl extends BaseConnection implements org.mobicents.media.server.impl.rtp.RtpListener, PooledObject
BaseConnection| Constructor and Description |
|---|
RtpConnectionImpl(int id,
org.mobicents.media.server.impl.rtp.ChannelsManager channelsManager,
DspFactory dspFactory)
Constructs a new RTP connection with one audio channel.
|
| Modifier and Type | Method and Description |
|---|---|
void |
checkIn() |
void |
checkOut() |
void |
generateCname() |
void |
generateOffer(boolean webrtc) |
AudioComponent |
getAudioComponent() |
long |
getBytesReceived() |
long |
getBytesTransmitted() |
String |
getCname() |
String |
getDescriptor() |
boolean |
getIsLocal()
Gets whether connection should be bound to local or remote interface.
|
double |
getJitter() |
String |
getLocalDescriptor() |
OOBComponent |
getOOBComponent() |
long |
getPacketsReceived() |
long |
getPacketsTransmitted() |
String |
getRemoteDescriptor() |
boolean |
isAvailable() |
protected void |
onClosed()
Called when connection is moving from OPEN state to NULL state.
|
protected void |
onCreated()
Called when connection created.
|
protected void |
onFailed()
Called if failure has bean detected during transition.
|
protected void |
onOpened()
Called when connected moved to OPEN state.
|
void |
onRtcpFailure(String e) |
void |
onRtcpFailure(Throwable e) |
void |
onRtpFailure(String message) |
void |
onRtpFailure(Throwable e) |
void |
setConnectionFailureListener(ConnectionFailureListener connectionFailureListener)
Sets connection failure listener.
|
void |
setIsLocal(boolean isLocal)
Sets whether connection should be bound to local or remote interface.
|
void |
setMode(ConnectionMode mode)
Modify mode of this connection for all known media types.
|
void |
setOtherParty(byte[] descriptor)
Joins endpoint which executes this connection with other party.
|
void |
setOtherParty(Connection other)
Joins endpoint wich executes this connection with other party.
|
void |
setOtherParty(Text descriptor)
Joins endpoint which executes this connection with other party.
|
String |
toString() |
addListener, bind, close, getEndpoint, getId, getMode, getState, getTextualId, join, releaseConnection, removeListener, setEndpointpublic RtpConnectionImpl(int id,
org.mobicents.media.server.impl.rtp.ChannelsManager channelsManager,
DspFactory dspFactory)
id - The unique ID of the connectionchannelsManager - The media channel providerdspFactory - The DSP providerpublic void generateCname()
generateCname in interface Connectionpublic String getCname()
getCname in interface Connectionpublic AudioComponent getAudioComponent()
getAudioComponent in class BaseConnectionpublic OOBComponent getOOBComponent()
getOOBComponent in class BaseConnectionpublic boolean getIsLocal()
BaseConnectionSupported only for RTP connections.
getIsLocal in interface ConnectiongetIsLocal in class BaseConnectionpublic void setIsLocal(boolean isLocal)
BaseConnectionSupported only for RTP connections.
setIsLocal in interface ConnectionsetIsLocal in class BaseConnectionpublic void setOtherParty(Connection other) throws IOException
BaseConnectionsetOtherParty in interface ConnectionsetOtherParty in class BaseConnectionother - the connection executed by other party endpoint.IOExceptionpublic void setOtherParty(byte[] descriptor)
throws IOException
BaseConnectionsetOtherParty in interface ConnectionsetOtherParty in class BaseConnectiondescriptor - the SDP descriptor of the other party.IOExceptionpublic void setOtherParty(Text descriptor) throws IOException
BaseConnectionsetOtherParty in interface ConnectionsetOtherParty in class BaseConnectiondescriptor - the SDP descriptor of the other party.IOExceptionpublic void setMode(ConnectionMode mode) throws ModeNotSupportedException
BaseConnectionsetMode in interface ConnectionsetMode in class BaseConnectionmode - the new mode of the connection.ModeNotSupportedExceptionpublic String getDescriptor()
getDescriptor in interface ConnectiongetDescriptor in class BaseConnectionpublic void generateOffer(boolean webrtc)
throws IOException
generateOffer in interface ConnectionIOExceptionpublic String getLocalDescriptor()
getLocalDescriptor in interface ConnectiongetLocalDescriptor in class BaseConnectionpublic String getRemoteDescriptor()
getRemoteDescriptor in interface ConnectiongetRemoteDescriptor in class BaseConnectionpublic long getPacketsReceived()
getPacketsReceived in interface Connectionpublic long getBytesReceived()
getBytesReceived in interface Connectionpublic long getPacketsTransmitted()
getPacketsTransmitted in interface Connectionpublic long getBytesTransmitted()
getBytesTransmitted in interface Connectionpublic double getJitter()
getJitter in interface Connectionpublic boolean isAvailable()
isAvailable in interface Connectionpublic void onRtpFailure(String message)
onRtpFailure in interface org.mobicents.media.server.impl.rtp.RtpListenerpublic void onRtpFailure(Throwable e)
onRtpFailure in interface org.mobicents.media.server.impl.rtp.RtpListenerpublic void onRtcpFailure(String e)
onRtcpFailure in interface org.mobicents.media.server.impl.rtp.RtpListenerpublic void onRtcpFailure(Throwable e)
onRtcpFailure in interface org.mobicents.media.server.impl.rtp.RtpListenerpublic void setConnectionFailureListener(ConnectionFailureListener connectionFailureListener)
BaseConnectionsetConnectionFailureListener in interface ConnectionsetConnectionFailureListener in class BaseConnectionprotected void onCreated()
throws Exception
BaseConnectiononCreated in class BaseConnectionExceptionprotected void onFailed()
BaseConnectiononFailed in class BaseConnectionprotected void onOpened()
throws Exception
BaseConnectiononOpened in class BaseConnectionExceptionprotected void onClosed()
BaseConnectiononClosed in class BaseConnectionpublic void checkIn()
checkIn in interface PooledObjectpublic void checkOut()
checkOut in interface PooledObjectCopyright © 2016 TeleStax, Inc.. All Rights Reserved.