org.mobicents.media.server.spi
Interface Endpoint

All Superinterfaces:
java.io.Serializable

public interface Endpoint
extends java.io.Serializable

The basic implementation of the endpoint. An Endpoint is a logical representation of a physical entity, such as an analog phone or a channel in a trunk. Endpoints are sources or sinks of data and can be physical or virtual. Physical endpoint creation requires hardware installation while software is sufficient for creating a virtual Endpoint. An interface on a gateway that terminates a trunk connected to a PSTN switch is an example of a physical Endpoint. An audio source in an audio-content server is an example of a virtual Endpoint.

Author:
Oleg Kulikov., amit.bhayani

Method Summary
 void addNotificationListener(NotificationListener listener)
          Register NotificationListener to listen for MsNotifyEvent which are fired due to events detected by Endpoints like DTMF.
 Connection createConnection()
          Creates new connection with specified mode.
 Connection createLocalConnection()
          Creates new connection with specified mode.
 void deleteAllConnections()
          Deletes all connection associated with this Endpoint.
 void deleteConnection(java.lang.String connectionID)
          Deletes specified connection.
 java.lang.String describe(MediaType mediaType)
          Generates media description for the specified media type.
 java.lang.String getLocalName()
          Gets the local name attribute.
 java.util.Collection<MediaType> getMediaTypes()
          Gets the list of supported media types.
 MediaSink getSink(MediaType media)
           
 MediaSource getSource(MediaType media)
           
 EndpointState getState()
          Gets the current state of the endpoint
 void removeNotificationListener(NotificationListener listener)
          Remove the NotificationListener
 void start()
          Starts endpoint.
 void stop()
          Terminates endpoint's execution.
 

Method Detail

getLocalName

java.lang.String getLocalName()
Gets the local name attribute.

Returns:
the local name.

getState

EndpointState getState()
Gets the current state of the endpoint

Returns:
the state of the endpoint.

getMediaTypes

java.util.Collection<MediaType> getMediaTypes()
Gets the list of supported media types.

Returns:
collection of media types.

start

void start()
           throws ResourceUnavailableException
Starts endpoint.

Throws:
ResourceUnavailableException

stop

void stop()
Terminates endpoint's execution.


createConnection

Connection createConnection()
                            throws TooManyConnectionsException,
                                   ResourceUnavailableException
Creates new connection with specified mode.

Parameters:
mode - the constant which identifies mode of the connection to be created.
Throws:
TooManyConnectionsException
ResourceUnavailableException

createLocalConnection

Connection createLocalConnection()
                                 throws TooManyConnectionsException,
                                        ResourceUnavailableException
Creates new connection with specified mode.

Parameters:
mode - the constant which identifies mode of the connection to be created.
Throws:
TooManyConnectionsException
ResourceUnavailableException

deleteConnection

void deleteConnection(java.lang.String connectionID)
Deletes specified connection.

Parameters:
connectionID - the identifier of the connection to be deleted.

deleteAllConnections

void deleteAllConnections()
Deletes all connection associated with this Endpoint.


addNotificationListener

void addNotificationListener(NotificationListener listener)
Register NotificationListener to listen for MsNotifyEvent which are fired due to events detected by Endpoints like DTMF. Use above execute methods to register for event passing appropriate RequestedEvent

Parameters:
listener -

removeNotificationListener

void removeNotificationListener(NotificationListener listener)
Remove the NotificationListener

Parameters:
listener -

getSink

MediaSink getSink(MediaType media)

getSource

MediaSource getSource(MediaType media)

describe

java.lang.String describe(MediaType mediaType)
                          throws ResourceUnavailableException
Generates media description for the specified media type.

Parameters:
mediaType - the media type for which descriptor is requested.
Returns:
SDP media descriptor
Throws:
ResourceUnavailableException


Copyright © 2010. All Rights Reserved.