org.mobicents.media.server
Class ConnectionImpl
java.lang.Object
org.mobicents.media.server.ConnectionImpl
- All Implemented Interfaces:
- java.io.Serializable, org.mobicents.media.server.spi.clock.Task, org.mobicents.media.server.spi.Connection
- Direct Known Subclasses:
- LocalConnectionImpl, RtpConnectionImpl
public abstract class ConnectionImpl
- extends java.lang.Object
- implements org.mobicents.media.server.spi.Connection, org.mobicents.media.server.spi.clock.Task
- Author:
- kulikov, amit bhayani
- See Also:
- Serialized Form
| Fields inherited from interface org.mobicents.media.server.spi.Connection |
CHANNEL_RX, CHANNEL_TX |
|
Method Summary |
void |
addListener(org.mobicents.media.server.spi.ConnectionListener listener)
|
void |
addNotificationListener(org.mobicents.media.server.spi.NotificationListener listener)
|
protected void |
bind(org.mobicents.media.server.spi.MediaType mediaType)
|
void |
cancel()
|
protected void |
close()
|
protected void |
close(org.mobicents.media.server.spi.MediaType mediaType)
|
org.mobicents.media.Component |
getComponent(org.mobicents.media.server.spi.MediaType type,
java.lang.Class interface1)
|
org.mobicents.media.Component |
getComponent(java.lang.String name)
|
org.mobicents.media.server.spi.Endpoint |
getEndpoint()
|
java.lang.String |
getId()
|
int |
getIndex()
|
int[] |
getLifeTime()
|
org.mobicents.media.server.spi.ConnectionMode |
getMode(org.mobicents.media.server.spi.MediaType mediaType)
|
long |
getStartTime()
|
org.mobicents.media.server.spi.ConnectionState |
getState()
|
boolean |
isActive()
|
protected void |
join()
Joins channels with sources and sinks. |
protected void |
join(org.mobicents.media.server.spi.MediaType mediaType)
|
int |
perform()
|
void |
removeListener(org.mobicents.media.server.spi.ConnectionListener listener)
|
void |
removeNotificationListener(org.mobicents.media.server.spi.NotificationListener listener)
|
void |
setIndex(int index)
|
void |
setLifeTime(int[] lifeTime)
|
void |
setMode(org.mobicents.media.server.spi.ConnectionMode mode)
|
void |
setMode(org.mobicents.media.server.spi.ConnectionMode mode,
org.mobicents.media.server.spi.MediaType mediaType)
|
void |
setStartTime(long startTime)
|
protected void |
setState(org.mobicents.media.server.spi.ConnectionState state)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.mobicents.media.server.spi.Connection |
getBytesReceived, getBytesReceived, getBytesTransmitted, getBytesTransmitted, getJitter, getJitter, getLocalDescriptor, getPacketsReceived, getPacketsTransmitted, getRemoteDescriptor, setOtherParty, setOtherParty, setOtherParty, setRemoteDescriptor |
mode
protected org.mobicents.media.server.spi.ConnectionMode[] mode
txChannels
protected Channel[] txChannels
rxChannels
protected Channel[] rxChannels
connectionListeners
protected java.util.concurrent.ConcurrentHashMap connectionListeners
stream
protected volatile int stream
ConnectionImpl
public ConnectionImpl(org.mobicents.media.server.spi.Endpoint endpoint,
ConnectionFactory factory)
throws org.mobicents.media.server.spi.ResourceUnavailableException
- Throws:
org.mobicents.media.server.spi.ResourceUnavailableException
join
protected void join(org.mobicents.media.server.spi.MediaType mediaType)
join
protected void join()
- Joins channels with sources and sinks.
bind
protected void bind(org.mobicents.media.server.spi.MediaType mediaType)
throws org.mobicents.media.server.spi.ResourceUnavailableException
- Throws:
org.mobicents.media.server.spi.ResourceUnavailableException
getId
public java.lang.String getId()
- Specified by:
getId in interface org.mobicents.media.server.spi.Connection
getIndex
public int getIndex()
setIndex
public void setIndex(int index)
getState
public org.mobicents.media.server.spi.ConnectionState getState()
- Specified by:
getState in interface org.mobicents.media.server.spi.Connection
setState
protected void setState(org.mobicents.media.server.spi.ConnectionState state)
getLifeTime
public int[] getLifeTime()
- Specified by:
getLifeTime in interface org.mobicents.media.server.spi.Connection
setLifeTime
public void setLifeTime(int[] lifeTime)
- Specified by:
setLifeTime in interface org.mobicents.media.server.spi.Connection
getMode
public org.mobicents.media.server.spi.ConnectionMode getMode(org.mobicents.media.server.spi.MediaType mediaType)
- Specified by:
getMode in interface org.mobicents.media.server.spi.Connection
setMode
public void setMode(org.mobicents.media.server.spi.ConnectionMode mode,
org.mobicents.media.server.spi.MediaType mediaType)
- Specified by:
setMode in interface org.mobicents.media.server.spi.Connection
setMode
public void setMode(org.mobicents.media.server.spi.ConnectionMode mode)
- Specified by:
setMode in interface org.mobicents.media.server.spi.Connection
getEndpoint
public org.mobicents.media.server.spi.Endpoint getEndpoint()
- Specified by:
getEndpoint in interface org.mobicents.media.server.spi.Connection
addListener
public void addListener(org.mobicents.media.server.spi.ConnectionListener listener)
- Specified by:
addListener in interface org.mobicents.media.server.spi.Connection
removeListener
public void removeListener(org.mobicents.media.server.spi.ConnectionListener listener)
- Specified by:
removeListener in interface org.mobicents.media.server.spi.Connection
getComponent
public org.mobicents.media.Component getComponent(java.lang.String name)
getComponent
public org.mobicents.media.Component getComponent(org.mobicents.media.server.spi.MediaType type,
java.lang.Class interface1)
- Specified by:
getComponent in interface org.mobicents.media.server.spi.Connection
addNotificationListener
public void addNotificationListener(org.mobicents.media.server.spi.NotificationListener listener)
- Specified by:
addNotificationListener in interface org.mobicents.media.server.spi.Connection
removeNotificationListener
public void removeNotificationListener(org.mobicents.media.server.spi.NotificationListener listener)
- Specified by:
removeNotificationListener in interface org.mobicents.media.server.spi.Connection
close
protected void close(org.mobicents.media.server.spi.MediaType mediaType)
close
protected void close()
getStartTime
public long getStartTime()
setStartTime
public void setStartTime(long startTime)
cancel
public void cancel()
- Specified by:
cancel in interface org.mobicents.media.server.spi.clock.Task
isActive
public boolean isActive()
- Specified by:
isActive in interface org.mobicents.media.server.spi.clock.Task
perform
public int perform()
- Specified by:
perform in interface org.mobicents.media.server.spi.clock.Task
Copyright © 2010. All Rights Reserved.