public abstract class AbstractSink extends BaseComponent implements MediaSink
AbstractSource and AbstractSink are implement
general wiring construct.
All media components have to extend one of these classes.| Constructor and Description |
|---|
AbstractSink(String name)
Creates new instance of sink with specified name.
|
| Modifier and Type | Method and Description |
|---|---|
abstract void |
activate() |
abstract void |
deactivate() |
protected void |
failed(Exception e)
Sends failure notification.
|
long |
getBytesReceived() |
long |
getPacketsReceived() |
boolean |
isStarted() |
abstract void |
onMediaTransfer(Frame frame)
This methos is called when new portion of media arrives.
|
void |
perform(Frame frame) |
String |
report() |
void |
reset() |
protected void |
start()
(Non Java-doc).
|
protected void |
started()
Sends notification that media processing has been started.
|
protected void |
stop()
(Non Java-doc).
|
protected void |
stopped()
Sends notification that detection is terminated.
|
getId, getNamepublic AbstractSink(String name)
name - the name of the sink to be created.public abstract void onMediaTransfer(Frame frame) throws IOException
buffer - the new portion of media data.IOExceptionprotected void start()
org.mobicents.media.MediaSink#start().protected void stop()
org.mobicents.media.MediaSink#stop().public abstract void deactivate()
deactivate in interface Componentprotected void failed(Exception e)
eventID - failure event identifier.e - the exception caused failure.public long getPacketsReceived()
getPacketsReceived in interface MediaSinkpublic long getBytesReceived()
getBytesReceived in interface MediaSinkprotected void started()
protected void stopped()
public String report()
Copyright © 2017 TeleStax, Inc.. All Rights Reserved.