org.mobicents.media
Interface MediaSink

All Superinterfaces:
Component, Serializable
All Known Subinterfaces:
DtmfDetector, DtmfDetector, Recorder, ToneDetector

public interface MediaSink
extends Component

Implements the media consumer.

Author:
Oleg Kulikov, baranowb

Method Summary
 void connect(Pipe pipe)
          Joins this media sink with media source.
 void disconnect(Pipe pipe)
          Breaks connection with media source.
 long getBytesReceived()
          Shows the number of bytes received by this sink since last start;
 long getPacketsReceived()
          Shows the number of packets received by this medis sink since last start.
 boolean isConnected()
          Gets the state of the component.
 boolean isStarted()
          Gets true if component is able to receive media.
 void start()
          Starts media processing.
 void stop()
          Terminates media processing.
 
Methods inherited from interface org.mobicents.media.Component
getId, getInterface, getName, reset
 

Method Detail

start

void start()
Starts media processing.


stop

void stop()
Terminates media processing.


connect

void connect(Pipe pipe)
Joins this media sink with media source. The concrete media sink can allow to join with multiple sources

Parameters:
source - the media source to join with.

disconnect

void disconnect(Pipe pipe)
Breaks connection with media source. The concrete media sink can allow to join with multiple sources so this method requires the explicit source for disconnection.

Parameters:
source - the source to disconnect from.

isConnected

boolean isConnected()
Gets the state of the component.

Returns:
true if component is connected to other component.

isStarted

boolean isStarted()
Gets true if component is able to receive media.

Returns:
true if component is able to receive media.

getPacketsReceived

long getPacketsReceived()
Shows the number of packets received by this medis sink since last start.

Returns:
the number of packets.

getBytesReceived

long getBytesReceived()
Shows the number of bytes received by this sink since last start;

Returns:
the number of bytes.


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