Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.neomedia
Class RTPConnectorTCPOutputStream

java.lang.Object
  extended by net.java.sip.communicator.impl.neomedia.RTPConnectorOutputStream
      extended by net.java.sip.communicator.impl.neomedia.RTPConnectorTCPOutputStream
All Implemented Interfaces:
javax.media.rtp.OutputDataStream
Direct Known Subclasses:
TransformTCPOutputStream

public class RTPConnectorTCPOutputStream
extends RTPConnectorOutputStream

RTPConnectorOutputStream implementation for TCP protocol.

Author:
Sebastien Vincent

Field Summary
 
Fields inherited from class net.java.sip.communicator.impl.neomedia.RTPConnectorOutputStream
MAX_PACKETS_PER_MILLIS_POLICY_PACKET_QUEUE_CAPACITY, targets
 
Constructor Summary
RTPConnectorTCPOutputStream(Socket socket)
          Initializes a new RTPConnectorTCPOutputStream.
 
Method Summary
protected  void doLogPacket(RawPacket packet, InetSocketAddress target)
          Log the packet.
protected  boolean isSocketValid()
          Returns whether or not this RTPConnectorOutputStream has a valid socket.
protected  void sendToTarget(RawPacket packet, InetSocketAddress target)
          Sends a specific RawPacket through this OutputDataStream to a specific InetSocketAddress.
 
Methods inherited from class net.java.sip.communicator.impl.neomedia.RTPConnectorOutputStream
addTarget, close, createRawPacket, logPacket, removeTarget, removeTargets, setMaxPacketsPerMillis, setPriority, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RTPConnectorTCPOutputStream

public RTPConnectorTCPOutputStream(Socket socket)
Initializes a new RTPConnectorTCPOutputStream.

Parameters:
socket - a Socket
Method Detail

sendToTarget

protected void sendToTarget(RawPacket packet,
                            InetSocketAddress target)
                     throws IOException
Sends a specific RawPacket through this OutputDataStream to a specific InetSocketAddress.

Specified by:
sendToTarget in class RTPConnectorOutputStream
Parameters:
packet - the RawPacket to send through this OutputDataStream to the specified target
target - the InetSocketAddress to which the specified packet is to be sent through this OutputDataStream
Throws:
IOException - if anything goes wrong while sending the specified packet through this OutputDataStream to the specified target

doLogPacket

protected void doLogPacket(RawPacket packet,
                           InetSocketAddress target)
Log the packet.

Specified by:
doLogPacket in class RTPConnectorOutputStream
Parameters:
packet - packet to log
target - the remote address associated with the packet

isSocketValid

protected boolean isSocketValid()
Returns whether or not this RTPConnectorOutputStream has a valid socket.

Specified by:
isSocketValid in class RTPConnectorOutputStream
Returns:
true if this RTPConnectorOutputStream has a valid socket; false, otherwise

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.