org.mobicents.media
Interface Component

All Superinterfaces:
java.io.Serializable
All Known Subinterfaces:
DtmfDetector, DtmfGenerator, Inlet, MediaSink, MediaSource, MultimediaResourceGroup, Outlet, Player, Recorder, ResourceGroup, SignalingProcessor, TTSEngine

public interface Component
extends java.io.Serializable

Component is an Object that is responsible for any media data processing. Examples of components are the audio player, recoder, DTMF detector, etc. The Component is a supper class for all media processing components.

Author:
kulikov

Method Summary
 void addListener(NotificationListener listener)
          Registers new notfications listener
 Connection getConnection()
          Reference to the connection to which this component belongs.
 Endpoint getEndpoint()
          Gets the reference to endpoint to which this component belongs
 Format getFormat()
          Gets the format used for communication.
 java.lang.String getId()
          Gets the unique identifier of this component.
<T> T
getInterface(java.lang.Class<T> interfaceType)
          This method returns proper interface.
 java.lang.String getName()
          Gets the name of the component.
 void removeListener(NotificationListener listener)
          Unregisters new notfications listener
 void resetStats()
          Resets any transmission stats.
 void setConnection(Connection connection)
          Set reference to the connection to which this component belongs.
 void setEndpoint(Endpoint endpoint)
          Sets reference to the endpoint to which this component belongs.
 

Method Detail

getId

java.lang.String getId()
Gets the unique identifier of this component.

Returns:

getName

java.lang.String getName()
Gets the name of the component. The component of same type can share same name.

Returns:
name of this component;

getFormat

Format getFormat()
Gets the format used for communication.

Returns:
the Format object.

getEndpoint

Endpoint getEndpoint()
Gets the reference to endpoint to which this component belongs

Returns:
the endpoint reference.

setEndpoint

void setEndpoint(Endpoint endpoint)
Sets reference to the endpoint to which this component belongs.

Parameters:
endpoint - the reference to the endpoint.

getConnection

Connection getConnection()
Reference to the connection to which this component belongs.

Returns:
the connection instance.

setConnection

void setConnection(Connection connection)
Set reference to the connection to which this component belongs.

Parameters:
connection - the connection instance.

addListener

void addListener(NotificationListener listener)
Registers new notfications listener

Parameters:
listener - the listener object.

removeListener

void removeListener(NotificationListener listener)
Unregisters new notfications listener

Parameters:
listener - the listener object.

resetStats

void resetStats()
Resets any transmission stats.


getInterface

<T> T getInterface(java.lang.Class<T> interfaceType)
This method returns proper interface. Returns concrete object if implementing this interface if this sink supports interface contract. In general case it may return this

Type Parameters:
T -
Parameters:
interfaceType -
Returns:


Copyright © 2010. All Rights Reserved.