org.mobicents.media.server.connection
Class RtpConnectionImpl

java.lang.Object
  extended by org.mobicents.media.server.connection.BaseConnection
      extended by org.mobicents.media.server.connection.RtpConnectionImpl
All Implemented Interfaces:
RTPChannelListener, Connection

public class RtpConnectionImpl
extends BaseConnection
implements RTPChannelListener

Author:
Oifa Yulian, amit bhayani

Field Summary
protected  RTPFormats audioFormats
           
protected  String descriptor
           
protected  SdpTemplate template
           
protected  RTPFormats videoFormats
           
 
Fields inherited from class org.mobicents.media.server.connection.BaseConnection
audioChannel, connections, videoChannel
 
Constructor Summary
RtpConnectionImpl(String id, Connections connections, Boolean isLocalToRemote)
           
 
Method Summary
 long getBytesReceived()
           
 long getBytesReceived(MediaType media)
           
 long getBytesTransmitted()
          (Non Java-doc).
 long getBytesTransmitted(MediaType media)
          (Non Java-doc).
 String getDescriptor()
          (Non Java-doc).
 boolean getIsLocal()
          Gets whether connection should be bound to local or remote interface , supported only for rtp connections.
 double getJitter()
          (Non Java-doc).
 double getJitter(MediaType media)
           
 long getPacketsReceived(MediaType media)
           
 long getPacketsTransmitted(MediaType media)
          (Non Java-doc).
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 onRtpFailure()
           
 void setConnectionFailureListener(ConnectionFailureListener connectionFailureListener)
          Sets connection failure listener.
 void setIsLocal(boolean isLocal)
          Gets whether connection should be bound to local or remote interface , supported only for rtp connections.
 void setMode(ConnectionMode mode)
          (Non Java-doc).
 void setOtherParty(byte[] descriptor)
           
 void setOtherParty(Connection other)
           
 void setOtherParty(Text descriptor)
           
 String toString()
           
 
Methods inherited from class org.mobicents.media.server.connection.BaseConnection
addListener, bind, close, getCheckPoint, getCheckPoint, getEndpoint, getId, getMode, getState, join, removeListener, setDtmfClamp, setGain, setMode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

audioFormats

protected RTPFormats audioFormats

videoFormats

protected RTPFormats videoFormats

template

protected SdpTemplate template

descriptor

protected String descriptor
Constructor Detail

RtpConnectionImpl

public RtpConnectionImpl(String id,
                         Connections connections,
                         Boolean isLocalToRemote)
                  throws Exception
Throws:
Exception
Method Detail

getIsLocal

public boolean getIsLocal()
Gets whether connection should be bound to local or remote interface , supported only for rtp connections.

Specified by:
getIsLocal in interface Connection
Overrides:
getIsLocal in class BaseConnection
Returns:
boolean value

setIsLocal

public void setIsLocal(boolean isLocal)
Gets whether connection should be bound to local or remote interface , supported only for rtp connections.

Specified by:
setIsLocal in interface Connection
Overrides:
setIsLocal in class BaseConnection

setOtherParty

public void setOtherParty(Connection other)
                   throws IOException
Specified by:
setOtherParty in interface Connection
Throws:
IOException

setMode

public void setMode(ConnectionMode mode)
             throws ModeNotSupportedException
Description copied from class: BaseConnection
(Non Java-doc).

Specified by:
setMode in interface Connection
Overrides:
setMode in class BaseConnection
Throws:
ModeNotSupportedException
See Also:
Connection.setMode(org.mobicents.media.server.spi.ConnectionMode)

setOtherParty

public void setOtherParty(byte[] descriptor)
                   throws IOException
Specified by:
setOtherParty in interface Connection
Throws:
IOException

setOtherParty

public void setOtherParty(Text descriptor)
                   throws IOException
Specified by:
setOtherParty in interface Connection
Throws:
IOException

getDescriptor

public String getDescriptor()
(Non Java-doc).

Specified by:
getDescriptor in interface Connection
Overrides:
getDescriptor in class BaseConnection
See Also:
Connection.getDescriptor()

getPacketsReceived

public long getPacketsReceived(MediaType media)
Specified by:
getPacketsReceived in interface Connection

getBytesReceived

public long getBytesReceived(MediaType media)
Specified by:
getBytesReceived in interface Connection

getBytesReceived

public long getBytesReceived()
Specified by:
getBytesReceived in interface Connection

getPacketsTransmitted

public long getPacketsTransmitted(MediaType media)
(Non Java-doc).

Specified by:
getPacketsTransmitted in interface Connection
See Also:
Connection.getPacketsTransmitted(org.mobicents.media.server.spi.MediaType)

getBytesTransmitted

public long getBytesTransmitted(MediaType media)
(Non Java-doc).

Specified by:
getBytesTransmitted in interface Connection
See Also:
Connection.getBytesTransmitted(org.mobicents.media.server.spi.MediaType)

getBytesTransmitted

public long getBytesTransmitted()
(Non Java-doc).

Specified by:
getBytesTransmitted in interface Connection
See Also:
Connection.getBytesTransmitted()

getJitter

public double getJitter(MediaType media)
Specified by:
getJitter in interface Connection

getJitter

public double getJitter()
(Non Java-doc).

Specified by:
getJitter in interface Connection
See Also:
Connection.getJitter()

toString

public String toString()
Overrides:
toString in class Object

onRtpFailure

public void onRtpFailure()
Specified by:
onRtpFailure in interface RTPChannelListener

setConnectionFailureListener

public void setConnectionFailureListener(ConnectionFailureListener connectionFailureListener)
Description copied from class: BaseConnection
Sets connection failure listener.

Specified by:
setConnectionFailureListener in interface Connection
Specified by:
setConnectionFailureListener in class BaseConnection

onCreated

protected void onCreated()
                  throws Exception
Description copied from class: BaseConnection
Called when connection created.

Specified by:
onCreated in class BaseConnection
Throws:
Exception

onFailed

protected void onFailed()
Description copied from class: BaseConnection
Called if failure has bean detected during transition.

Specified by:
onFailed in class BaseConnection

onOpened

protected void onOpened()
                 throws Exception
Description copied from class: BaseConnection
Called when connected moved to OPEN state.

Specified by:
onOpened in class BaseConnection
Throws:
Exception

onClosed

protected void onClosed()
Description copied from class: BaseConnection
Called when connection is moving from OPEN state to NULL state.

Specified by:
onClosed in class BaseConnection


Copyright © 2012 TeleStax, Inc.. All Rights Reserved.