org.mobicents.media.server.connection
Class Channel

java.lang.Object
  extended by org.mobicents.media.server.connection.Channel
Direct Known Subclasses:
LocalToRemoteChannel

public class Channel
extends Object

Represents the bi-directional transition path for a particular media type stream.

Author:
kulikov

Nested Class Summary
protected  class Channel.CnfMode
          Conference mode
protected  class Channel.Mode
          Transmission mode
 class Channel.NetworkLoopMode
          Terminates channel to itself
 class Channel.SendOnlyMode
          Transmission from connections to channel.
 class Channel.SendRecvMode
          Transmission in both directions
 
Field Summary
protected  Channel.CnfMode cnfMode
           
protected  BaseConnection connection
           
protected  Connections connections
           
protected  PipeImpl localPipe
           
protected  Mixer mixer
           
protected  AtomicReference<Channel.Mode> mode
           
protected  Channel.NetworkLoopMode network_loop
           
protected  Channel otherChannel
           
protected  org.mobicents.media.server.connection.Channel.RecvOnlyMode recvOnly
           
protected  PipeImpl rxPipe
           
protected  Channel.SendRecvMode send_recv
           
protected  Channel.SendOnlyMode sendOnly
           
protected  Splitter splitter
           
protected  PipeImpl txPipe
           
 
Constructor Summary
Channel(BaseConnection connection, Connections connections, MediaType mediaType, Mixer mixer, Splitter splitter)
           
 
Method Summary
 void connect(Channel other)
          Joins with other channel
 void connect(RTPDataChannel other)
           
protected  Channel.Mode convert(ConnectionMode mode)
          Creates switch executor for specified mode.
 void disconnect()
          Disconnects this channel from another if it was connected previously
 CheckPoint getCheckPoint(int i)
          Gets the access to the specified check point.
 MediaType getMediaType()
          Gets the media type of this channel.
 ConnectionMode getMode()
          Gets the current transmission mode.
 String report()
           
 void setDtmfClamp(Boolean dtmfClamp)
          Modify dtmf clamp for splitter Applicable for audio channel only.
 void setGain(double gain)
          Modify gain of the tx stream.
 void setMode(ConnectionMode mode)
          Changes transmission mode.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

connection

protected BaseConnection connection

mixer

protected Mixer mixer

splitter

protected Splitter splitter

txPipe

protected PipeImpl txPipe

rxPipe

protected PipeImpl rxPipe

localPipe

protected PipeImpl localPipe

otherChannel

protected Channel otherChannel

connections

protected Connections connections

recvOnly

protected org.mobicents.media.server.connection.Channel.RecvOnlyMode recvOnly

sendOnly

protected Channel.SendOnlyMode sendOnly

send_recv

protected Channel.SendRecvMode send_recv

network_loop

protected Channel.NetworkLoopMode network_loop

cnfMode

protected Channel.CnfMode cnfMode

mode

protected AtomicReference<Channel.Mode> mode
Constructor Detail

Channel

public Channel(BaseConnection connection,
               Connections connections,
               MediaType mediaType,
               Mixer mixer,
               Splitter splitter)
        throws Exception
Throws:
Exception
Method Detail

setDtmfClamp

public void setDtmfClamp(Boolean dtmfClamp)
Modify dtmf clamp for splitter Applicable for audio channel only.

Parameters:
dtmfClamp - the value of the dtmfClamp.

setGain

public void setGain(double gain)
Modify gain of the tx stream. Applicable for audio channel only.

Parameters:
gain - the value of the gain.

getMediaType

public MediaType getMediaType()
Gets the media type of this channel.

Returns:
the media type identifier.

setMode

public void setMode(ConnectionMode mode)
             throws ModeNotSupportedException
Changes transmission mode.

Parameters:
mode - the identifier of transmission mode.
Throws:
ModeNotSupportedException

getMode

public ConnectionMode getMode()
Gets the current transmission mode.

Returns:
the mode identifier.

convert

protected Channel.Mode convert(ConnectionMode mode)
                        throws ModeNotSupportedException
Creates switch executor for specified mode.

Parameters:
mode - the mode value.
Returns:
switch executor
Throws:
ModeNotSupportedException

getCheckPoint

public CheckPoint getCheckPoint(int i)
Gets the access to the specified check point.

Parameters:
i - the check point identifier.
Returns:
check point.

report

public String report()

connect

public void connect(RTPDataChannel other)

connect

public void connect(Channel other)
Joins with other channel

Parameters:
other - the other channel

disconnect

public void disconnect()
Disconnects this channel from another if it was connected previously



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