org.mobicents.media.server.spi
Interface Endpoint


public interface Endpoint

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
 Connection createConnection(ConnectionType type)
          Creates new connection with specified mode.
 void deleteAllConnections()
          Deletes all connection associated with this Endpoint.
 void deleteConnection(Connection connection)
          Deletes specified connection.
 String describe(MediaType mediaType)
          Generates media description for the specified media type.
 String getLocalName()
          Gets the local name attribute.
 Collection<MediaType> getMediaTypes()
          Gets the list of supported media types.
 Component getResource(MediaType mediaType, Class intf)
          Provides access to the specific resource of the endpoint.
 EndpointState getState()
          Gets the current state of the endpoint
 void setDspFactory(DspFactory dspFactory)
           
 void start()
          Starts endpoint.
 void stop()
          Terminates endpoint's execution.
 

Method Detail

getLocalName

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

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(ConnectionType type)
                            throws TooManyConnectionsException,
                                   ResourceUnavailableException
Creates new connection with specified mode.

Parameters:
type - transport type
Throws:
TooManyConnectionsException
ResourceUnavailableException

deleteConnection

void deleteConnection(Connection connection)
Deletes specified connection.

Parameters:
connection - the connection to be deleted.

deleteAllConnections

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


describe

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

setDspFactory

void setDspFactory(DspFactory dspFactory)

getResource

Component getResource(MediaType mediaType,
                      Class intf)
Provides access to the specific resource of the endpoint.

Parameters:
intf - the interface of the requested resource
Returns:
The component implementing resource.


Copyright © 2011. All Rights Reserved.