org.mobicents.media.server.testsuite.general.rtp
Class RtpSocketImpl

java.lang.Object
  extended by org.mobicents.media.server.testsuite.general.rtp.RtpSocketImpl
All Implemented Interfaces:
RtpSocket

public class RtpSocketImpl
extends java.lang.Object
implements RtpSocket

Start time:10:17:34 2009-08-03
Project: mobicents-media-server-test-suite

Author:
Bartosz Baranowski

Constructor Summary
RtpSocketImpl(java.util.Vector<javax.sdp.Attribute> formatMap, RtpSocketFactoryImpl rtpSocketFactory)
           
 
Method Summary
 void addListener(RtpSocketListener listener)
           
 void close()
          Closes socket
 java.nio.channels.DatagramChannel getChannel()
           
 java.lang.String getLocalAddress()
          Gets address to which this socked is bound.
 int getLocalPort()
          Returns port number to which this socked is bound.
 java.nio.channels.SelectionKey getSelectionKey()
           
 int init(java.net.InetAddress localAddress, int lowPort, int highPort)
           
 boolean isChannelOpen()
           
 void notify(java.lang.Exception e)
           
 void receive(RtpPacket rtpPacket)
           
 void release()
           
 void removeListener(RtpSocketListener listener)
           
 void resetRtpMap()
           
 void setPeer(java.net.InetAddress address, int port)
          Assigns remote end.
 void setSelectionKey(java.nio.channels.SelectionKey key)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RtpSocketImpl

public RtpSocketImpl(java.util.Vector<javax.sdp.Attribute> formatMap,
                     RtpSocketFactoryImpl rtpSocketFactory)
Parameters:
transceiver -
timer -
formatMap -
rtpSocketFactoryImpl2 -
Method Detail

init

public int init(java.net.InetAddress localAddress,
                int lowPort,
                int highPort)
         throws java.net.SocketException,
                java.io.IOException
Specified by:
init in interface RtpSocket
Throws:
java.net.SocketException
java.io.IOException

addListener

public void addListener(RtpSocketListener listener)
Specified by:
addListener in interface RtpSocket

removeListener

public void removeListener(RtpSocketListener listener)
Specified by:
removeListener in interface RtpSocket

resetRtpMap

public void resetRtpMap()

isChannelOpen

public boolean isChannelOpen()
Specified by:
isChannelOpen in interface RtpSocket

release

public void release()
Specified by:
release in interface RtpSocket

close

public void close()
Closes socket

Specified by:
close in interface RtpSocket

setPeer

public void setPeer(java.net.InetAddress address,
                    int port)
             throws java.io.IOException
Assigns remote end.

Specified by:
setPeer in interface RtpSocket
Parameters:
address - the address of the remote party.
port - the port number of the remote party.
Throws:
java.io.IOException

getLocalAddress

public java.lang.String getLocalAddress()
Gets address to which this socked is bound.

Specified by:
getLocalAddress in interface RtpSocket
Returns:
either local address to which this socket is bound

getLocalPort

public int getLocalPort()
Returns port number to which this socked is bound.

Specified by:
getLocalPort in interface RtpSocket
Returns:
port number or -1 if socket not bound.

notify

public void notify(java.lang.Exception e)
Specified by:
notify in interface RtpSocket

receive

public void receive(RtpPacket rtpPacket)
Specified by:
receive in interface RtpSocket

getSelectionKey

public java.nio.channels.SelectionKey getSelectionKey()
Specified by:
getSelectionKey in interface RtpSocket

setSelectionKey

public void setSelectionKey(java.nio.channels.SelectionKey key)

getChannel

public java.nio.channels.DatagramChannel getChannel()
Specified by:
getChannel in interface RtpSocket
Returns:


Copyright © 2009. All Rights Reserved.