org.mobicents.media.server.mgcp
Class MgcpProvider

java.lang.Object
  extended by org.mobicents.media.server.mgcp.MgcpProvider

public class MgcpProvider
extends Object

Author:
Oifa Yulian

Constructor Summary
protected MgcpProvider(String name, UdpManager transport, int port, org.mobicents.media.server.scheduler.Scheduler scheduler)
          Creates new provider instance.
  MgcpProvider(UdpManager transport, int port, org.mobicents.media.server.scheduler.Scheduler scheduler)
          Creates new provider instance.
 
Method Summary
 void activate()
           
 void addListener(MgcpListener listener)
          Registers new even listener.
 MgcpEvent createEvent(int eventID, SocketAddress address)
          Creates new event object.
 void removeListener(MgcpListener listener)
          Unregisters event listener.
 void send(MgcpEvent event)
          Sends message.
 void send(MgcpEvent event, SocketAddress destination)
          Sends message.
 void send(MgcpMessage message, SocketAddress destination)
          Sends message.
 void shutdown()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MgcpProvider

public MgcpProvider(UdpManager transport,
                    int port,
                    org.mobicents.media.server.scheduler.Scheduler scheduler)
Creates new provider instance.

Parameters:
transport - the UDP interface instance.
port - port number to bind
scheduler - job scheduler

MgcpProvider

protected MgcpProvider(String name,
                       UdpManager transport,
                       int port,
                       org.mobicents.media.server.scheduler.Scheduler scheduler)
Creates new provider instance. Used for tests

Parameters:
transport - the UDP interface instance.
port - port number to bind
scheduler - job scheduler
Method Detail

createEvent

public MgcpEvent createEvent(int eventID,
                             SocketAddress address)
Creates new event object.

Parameters:
eventID - the event identifier: REQUEST or RESPONSE
Returns:
event object.

send

public void send(MgcpEvent event,
                 SocketAddress destination)
          throws IOException
Sends message.

Parameters:
message - the message to send.
destination - the IP address of the destination.
Throws:
IOException

send

public void send(MgcpEvent event)
          throws IOException
Sends message.

Parameters:
message - the message to send.
Throws:
IOException

send

public void send(MgcpMessage message,
                 SocketAddress destination)
          throws IOException
Sends message.

Parameters:
message - the message to send.
destination - the IP address of the destination.
Throws:
IOException

addListener

public void addListener(MgcpListener listener)
                 throws TooManyListenersException
Registers new even listener.

Parameters:
listener - the listener instance to be registered.
Throws:
TooManyListenersException

removeListener

public void removeListener(MgcpListener listener)
Unregisters event listener.

Parameters:
listener - the event listener instance to be unregistered.

activate

public void activate()

shutdown

public void shutdown()


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