|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mobicents.media.server.impl.BaseComponent
org.mobicents.media.server.impl.AbstractSink
public abstract class AbstractSink
The base implementation of the media sink.
AbstractSource and AbstractSink are implement
general wirring contruct.
All media components have to extend one of these classes.
| Field Summary | |
|---|---|
protected org.mobicents.media.MediaSource |
otherParty
|
| Constructor Summary | |
|---|---|
AbstractSink(java.lang.String name)
Creates new instance of sink with specified name. |
|
| Method Summary | |
|---|---|
void |
connect(org.mobicents.media.MediaSource otherParty)
(Non Java-doc). |
void |
connect(org.mobicents.media.Outlet outlet)
|
void |
disconnect(org.mobicents.media.MediaSource otherParty)
(Non Java-doc). |
void |
disconnect(org.mobicents.media.Outlet outlet)
|
protected void |
failed(int eventID,
java.lang.Exception e)
Sends failure notification. |
long |
getBytesReceived()
(Non Java-doc). |
long |
getPacketsReceived()
(Non Java-doc). |
boolean |
isConnected()
(Non Java-doc). |
boolean |
isMultipleConnectionsAllowed()
|
boolean |
isStarted()
(Non Java-doc). |
abstract void |
onMediaTransfer(org.mobicents.media.Buffer buffer)
This methos is called when new portion of media arrives. |
void |
receive(org.mobicents.media.Buffer buffer)
(Non Java-doc). |
void |
resetStats()
|
void |
start()
(Non Java-doc). |
protected void |
started()
Sends notification that media processing has been started. |
void |
stop()
(Non Java-doc). |
protected void |
stopped()
Sends notification that detection is terminated. |
| Methods inherited from class org.mobicents.media.server.impl.BaseComponent |
|---|
addListener, getConnection, getEndpoint, getId, getName, getResourceType, removeListener, sendEvent, setConnection, setEndpoint, setResourceType, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.mobicents.media.MediaSink |
|---|
getFormats, isAcceptable |
| Methods inherited from interface org.mobicents.media.Component |
|---|
addListener, getConnection, getEndpoint, getId, getName, removeListener, setConnection, setEndpoint |
| Field Detail |
|---|
protected transient org.mobicents.media.MediaSource otherParty
| Constructor Detail |
|---|
public AbstractSink(java.lang.String name)
name - the name of the sink to be created.| Method Detail |
|---|
public boolean isMultipleConnectionsAllowed()
isMultipleConnectionsAllowed in interface org.mobicents.media.MediaSinkpublic void connect(org.mobicents.media.MediaSource otherParty)
connect in interface org.mobicents.media.MediaSinkorg.mobicents.media.MediaSink#connect(MediaStream).public void disconnect(org.mobicents.media.MediaSource otherParty)
disconnect in interface org.mobicents.media.MediaSinkorg.mobicents.media.MediaSink#disconnect(MediaStream).public void connect(org.mobicents.media.Outlet outlet)
connect in interface org.mobicents.media.MediaSinkpublic void disconnect(org.mobicents.media.Outlet outlet)
disconnect in interface org.mobicents.media.MediaSinkpublic boolean isConnected()
isConnected in interface org.mobicents.media.MediaSinkMediaSink.isConnected().public boolean isStarted()
isStarted in interface org.mobicents.media.MediaSinkMediaSink.isStarted().
public abstract void onMediaTransfer(org.mobicents.media.Buffer buffer)
throws java.io.IOException
buffer - the new portion of media data.
java.io.IOExceptionpublic void start()
start in interface org.mobicents.media.ComponentComponent.start().public void stop()
stop in interface org.mobicents.media.ComponentComponent.stop().
public void receive(org.mobicents.media.Buffer buffer)
throws java.io.IOException
receive in interface org.mobicents.media.MediaSinkjava.io.IOExceptionorg.mobicents.media.MediaSink#receive().
protected void failed(int eventID,
java.lang.Exception e)
eventID - failure event identifier.e - the exception caused failure.public long getPacketsReceived()
getPacketsReceived in interface org.mobicents.media.MediaSinkMediaSink.getPacketsReceived().public long getBytesReceived()
getBytesReceived in interface org.mobicents.media.MediaSinkMediaSink.getBytesReceived()public void resetStats()
resetStats in interface org.mobicents.media.ComponentresetStats in class BaseComponentprotected void started()
protected void stopped()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||