|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mobicents.media.server.connection.BaseConnection
public abstract class BaseConnection
Implements connection's FSM.
| Field Summary | |
|---|---|
protected Channel |
audioChannel
|
protected Connections |
connections
|
protected Channel |
videoChannel
|
| Constructor Summary | |
|---|---|
BaseConnection(String id,
Connections connections,
Boolean isLocalToRemote)
Creates basic connection implementation. |
|
| Method Summary | |
|---|---|
void |
addListener(ConnectionListener listener)
(Non Java-doc). |
void |
bind()
Initiates transition from NULL to HALF_OPEN state. |
void |
close()
Initiates transition from any state to state NULL. |
CheckPoint |
getCheckPoint(int i)
|
CheckPoint |
getCheckPoint(MediaType mediaType,
int i)
|
String |
getDescriptor()
(Non Java-doc). |
Endpoint |
getEndpoint()
(Non Java-doc). |
String |
getId()
(Non Java-doc). |
boolean |
getIsLocal()
Gets whether connection should be bound to local or remote interface , supported only for rtp connections. |
ConnectionMode |
getMode(MediaType mediaType)
(Non Java-doc). |
ConnectionState |
getState()
(Non Java-doc). |
void |
join()
Initiates transition from HALF_OPEN to OPEN state. |
protected abstract void |
onClosed()
Called when connection is moving from OPEN state to NULL state. |
protected abstract void |
onCreated()
Called when connection created. |
protected abstract void |
onFailed()
Called if failure has bean detected during transition. |
protected abstract void |
onOpened()
Called when connected moved to OPEN state. |
void |
removeListener(ConnectionListener listener)
(Non Java-doc). |
abstract void |
setConnectionFailureListener(ConnectionFailureListener connectionFailureListener)
Sets connection failure listener. |
void |
setDtmfClamp(boolean dtmfClamp)
(Non Java-doc.) |
void |
setGain(double gain)
(Non Java-doc.) |
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 |
setMode(ConnectionMode mode,
MediaType mediaType)
(Non Java-doc). |
| 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, getPacketsReceived, getPacketsTransmitted, setOtherParty, setOtherParty, setOtherParty |
| Field Detail |
|---|
protected final Connections connections
protected Channel audioChannel
protected Channel videoChannel
| Constructor Detail |
|---|
public BaseConnection(String id,
Connections connections,
Boolean isLocalToRemote)
throws Exception
id - the unique identifier of this connection within endpoint.endpoint - the endpoint owner of this connection.
Exception| Method Detail |
|---|
public String getId()
getId in interface ConnectionConnection.getId()public ConnectionState getState()
getState in interface ConnectionConnection.getState()public String getDescriptor()
getDescriptor in interface ConnectionConnection.getDescriptor()public Endpoint getEndpoint()
getEndpoint in interface ConnectionConnection.getEndpoint()public ConnectionMode getMode(MediaType mediaType)
getMode in interface ConnectionConnection.getMode(org.mobicents.media.server.spi.MediaType)public void setGain(double gain)
setGain in interface ConnectionConnection.setGain(double)public void setDtmfClamp(boolean dtmfClamp)
setDtmfClamp in interface ConnectionConnection.setDtmfClamp(boolean)
public void setMode(ConnectionMode mode,
MediaType mediaType)
throws ModeNotSupportedException
setMode in interface ConnectionModeNotSupportedExceptionConnection.setMode(org.mobicents.media.server.spi.ConnectionMode, org.mobicents.media.server.spi.MediaType)
public void setMode(ConnectionMode mode)
throws ModeNotSupportedException
setMode in interface ConnectionModeNotSupportedExceptionConnection.setMode(org.mobicents.media.server.spi.ConnectionMode)public CheckPoint getCheckPoint(int i)
public CheckPoint getCheckPoint(MediaType mediaType,
int i)
public void addListener(ConnectionListener listener)
addListener in interface ConnectionConnection.addListener(org.mobicents.media.server.spi.ConnectionListener)public void removeListener(ConnectionListener listener)
removeListener in interface ConnectionConnection.removeListener(org.mobicents.media.server.spi.ConnectionListener)
public void bind()
throws Exception
Exception
public void join()
throws Exception
Exceptionpublic void close()
public abstract void setConnectionFailureListener(ConnectionFailureListener connectionFailureListener)
setConnectionFailureListener in interface Connection
protected abstract void onCreated()
throws Exception
Exception
protected abstract void onOpened()
throws Exception
Exceptionprotected abstract void onClosed()
protected abstract void onFailed()
public boolean getIsLocal()
getIsLocal in interface Connectionpublic void setIsLocal(boolean isLocal)
setIsLocal in interface Connection
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||