org.mobicents.media.server
Class BaseEndpointImpl

java.lang.Object
  extended by org.mobicents.media.server.BaseEndpointImpl
All Implemented Interfaces:
Endpoint
Direct Known Subclasses:
BaseSS7EndpointImpl

public abstract class BaseEndpointImpl
extends Object
implements Endpoint

Basic implementation of the endpoint.

Author:
kulikov, amit bhayani

Field Summary
protected  Connections connections
           
static int ENDPOINT_LOCAL_TO_REMOTE
           
static int ENDPOINT_NORMAL
           
static int ENDPOINT_REMOTE_TO_REMOTE
           
protected  ArrayList<MediaType> mediaTypes
           
 
Constructor Summary
BaseEndpointImpl(String localName, int endpointType)
           
 
Method Summary
abstract  void block()
           
 void configure(boolean isALaw)
           
 Connection createConnection(ConnectionType type, boolean isLocal)
          (Non Java-doc.)
 void deleteAllConnections()
          (Non Java-doc).
 void deleteConnection(Connection connection)
          (Non Java-doc.)
 String describe(MediaType mediaType)
          Gets the SDP of this endpoint.
 int getActiveConnectionsCount()
           
 Clock getClock()
          Provides access to the wall clock used by this endpoint and scheduler
 Connection getConnection(String connectionID)
           
 Collection<Connection> getConnections()
           
 DspFactory getDspFactory()
          Gets access to the DSP factory.
 String getLocalName()
          (Non Java-doc.)
 Collection<MediaType> getMediaTypes()
          (Non Java-doc.)
 RTPManager getRtpManager()
          Real time transmission over IP network service
 Scheduler getScheduler()
          Provides access to the scheduler.
abstract  MediaSink getSink(MediaType media)
          Provides access to the media sink.
abstract  MediaSource getSource(MediaType media)
          Provides access to the media source.
 EndpointState getState()
          (Non Java-doc.)
 void setDspFactory(DspFactory dspFactory)
          Assigns DSP factory to this endpoint.
 void setLocalConnections(int localConnections)
          Assigns number of local connections.
 void setRtpConnections(int rtpConnections)
          Assigns number of rtp connections.
 void setRtpManager(RTPManager rtpManager)
          Real time transmission over IP network service
 void setScheduler(Scheduler scheduler)
          Assigns scheduler.
protected  void setState(EndpointState state)
          Modifies state indicator.
 void start()
          (Non Java-doc.)
 void stop()
          (Non Java-doc.)
abstract  void unblock()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.mobicents.media.server.spi.Endpoint
getResource
 

Field Detail

ENDPOINT_NORMAL

public static final int ENDPOINT_NORMAL
See Also:
Constant Field Values

ENDPOINT_LOCAL_TO_REMOTE

public static final int ENDPOINT_LOCAL_TO_REMOTE
See Also:
Constant Field Values

ENDPOINT_REMOTE_TO_REMOTE

public static final int ENDPOINT_REMOTE_TO_REMOTE
See Also:
Constant Field Values

connections

protected Connections connections

mediaTypes

protected ArrayList<MediaType> mediaTypes
Constructor Detail

BaseEndpointImpl

public BaseEndpointImpl(String localName,
                        int endpointType)
Method Detail

getLocalName

public String getLocalName()
(Non Java-doc.)

Specified by:
getLocalName in interface Endpoint
See Also:
Endpoint.getLocalName()

setScheduler

public void setScheduler(Scheduler scheduler)
Assigns scheduler.

Parameters:
scheduler - the scheduler instance.

getScheduler

public Scheduler getScheduler()
Provides access to the scheduler.

Specified by:
getScheduler in interface Endpoint
Returns:
scheduler instance.

getClock

public Clock getClock()
Provides access to the wall clock used by this endpoint and scheduler

Returns:
the wall clock instance.

getState

public EndpointState getState()
(Non Java-doc.)

Specified by:
getState in interface Endpoint
See Also:
Endpoint.getState()

setState

protected void setState(EndpointState state)
Modifies state indicator.

Parameters:
state - the new value of the state indicator.

getMediaTypes

public Collection<MediaType> getMediaTypes()
(Non Java-doc.)

Specified by:
getMediaTypes in interface Endpoint
See Also:
Endpoint.getMediaTypes()

setDspFactory

public void setDspFactory(DspFactory dspFactory)
Assigns DSP factory to this endpoint.

Specified by:
setDspFactory in interface Endpoint
Parameters:
dspFactory - the DSP factory.

getDspFactory

public DspFactory getDspFactory()
Gets access to the DSP factory.

Returns:
the DSP factory instance

setLocalConnections

public void setLocalConnections(int localConnections)
Assigns number of local connections.

Specified by:
setLocalConnections in interface Endpoint
Parameters:
localConnections - the number of connections.

setRtpConnections

public void setRtpConnections(int rtpConnections)
Assigns number of rtp connections.

Specified by:
setRtpConnections in interface Endpoint
Parameters:
rtpConnections - the number of connections.

getSink

public abstract MediaSink getSink(MediaType media)
Provides access to the media sink.

Parameters:
media - the media type
Returns:
sink of this media type

getSource

public abstract MediaSource getSource(MediaType media)
Provides access to the media source.

Parameters:
media - the media type
Returns:
sink of this media type

start

public void start()
           throws ResourceUnavailableException
(Non Java-doc.)

Specified by:
start in interface Endpoint
Throws:
ResourceUnavailableException
See Also:
Endpoint.start()

stop

public void stop()
(Non Java-doc.)

Specified by:
stop in interface Endpoint
See Also:
Endpoint.stop()

setRtpManager

public void setRtpManager(RTPManager rtpManager)
Real time transmission over IP network service

Parameters:
rtpManager - the entry point to the RTP service

getRtpManager

public RTPManager getRtpManager()
Real time transmission over IP network service

Returns:
the entry point to the RTP service

getConnections

public Collection<Connection> getConnections()

describe

public String describe(MediaType mediaType)
                throws ResourceUnavailableException
Gets the SDP of this endpoint.

Specified by:
describe in interface Endpoint
Parameters:
mediaType -
Returns:
Throws:
ResourceUnavailableException

createConnection

public Connection createConnection(ConnectionType type,
                                   boolean isLocal)
                            throws TooManyConnectionsException,
                                   ResourceUnavailableException
(Non Java-doc.)

Specified by:
createConnection in interface Endpoint
Throws:
TooManyConnectionsException
ResourceUnavailableException
See Also:
org.mobicents.media.server.spi.Endpoint#createConnection(org.mobicents.media.server.spi.ConnectionMode);

deleteConnection

public void deleteConnection(Connection connection)
(Non Java-doc.)

Specified by:
deleteConnection in interface Endpoint
See Also:
Endpoint.deleteConnection(Connection)

deleteAllConnections

public void deleteAllConnections()
(Non Java-doc).

Specified by:
deleteAllConnections in interface Endpoint
See Also:
Endpoint.deleteAllConnections();

getConnection

public Connection getConnection(String connectionID)

getActiveConnectionsCount

public int getActiveConnectionsCount()
Specified by:
getActiveConnectionsCount in interface Endpoint

configure

public void configure(boolean isALaw)
Specified by:
configure in interface Endpoint

unblock

public abstract void unblock()

block

public abstract void block()


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