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:
Yulian Oifa, amit.bhayani

Method Summary
 void configure(boolean isALaw)
          Configure Endpoint.
 Connection createConnection(ConnectionType type, Boolean isLocal)
          Creates new connection with specified mode.
 void deleteAllConnections()
          Deletes all connection associated with this Endpoint.
 void deleteConnection(Connection connection)
          Deletes specified connection.
 void deleteConnection(Connection connection, ConnectionType type)
          Deletes specified connection.
 int getActiveConnectionsCount()
          Gets number of active connections associated with this Endpoint.
 String getLocalName()
          Gets the local name attribute.
 Component getResource(MediaType mediaType, ComponentType componentType)
          Provides access to the specific resource of the endpoint.
 Scheduler getScheduler()
          Gets the scheduler
 EndpointState getState()
          Gets the current state of the endpoint
 boolean hasResource(MediaType mediaType, ComponentType componentType)
          Provides access to the specific resource of the endpoint.
 void modeUpdated(ConnectionMode oldMode, ConnectionMode newMode)
          Notifies that mode has been update on one of connections
 void releaseResource(MediaType mediaType, ComponentType componentType)
          Allows to release resource when not needed anymore
 void setScheduler(Scheduler scheduler)
          Sets the scheduler
 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.

start

void start()
           throws ResourceUnavailableException
Starts endpoint.

Throws:
ResourceUnavailableException

stop

void stop()
Terminates endpoint's execution.


createConnection

Connection createConnection(ConnectionType type,
                            Boolean isLocal)
                            throws ResourceUnavailableException
Creates new connection with specified mode.

Parameters:
type - transport type
Throws:
ResourceUnavailableException

deleteConnection

void deleteConnection(Connection connection)
Deletes specified connection.

Parameters:
connection - the connection to be deleted.

deleteConnection

void deleteConnection(Connection connection,
                      ConnectionType type)
Deletes specified connection.

Parameters:
connection - the connection to be deleted.

modeUpdated

void modeUpdated(ConnectionMode oldMode,
                 ConnectionMode newMode)
Notifies that mode has been update on one of connections

Parameters:
connection - the connection to be deleted.

deleteAllConnections

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


getActiveConnectionsCount

int getActiveConnectionsCount()
Gets number of active connections associated with this Endpoint.


configure

void configure(boolean isALaw)
Configure Endpoint.


getScheduler

Scheduler getScheduler()
Gets the scheduler


setScheduler

void setScheduler(Scheduler scheduler)
Sets the scheduler


getResource

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

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

hasResource

boolean hasResource(MediaType mediaType,
                    ComponentType componentType)
Provides access to the specific resource of the endpoint.

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

releaseResource

void releaseResource(MediaType mediaType,
                     ComponentType componentType)
Allows to release resource when not needed anymore

Parameters:
component - type of the requested resource


Copyright © 2013 TeleStax, Inc.. All Rights Reserved.