Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.service.neomedia
Interface StreamConnector

All Known Implementing Classes:
DefaultStreamConnector, DefaultTCPStreamConnector

public interface StreamConnector

The StreamConnector interface represents a pair of datagram sockets that a media stream could use for RTP and RTCP traffic.

The reason why this media service makes sockets visible through this StreamConnector is so that they could be shared among media and other libraries that may need to use them like an ICE implementation for example.

Author:
Emil Ivov

Nested Class Summary
static class StreamConnector.Protocol
          Enumerates the protocols supported by StreamConnector.
 
Method Summary
 void close()
          Releases the resources allocated by this instance in the course of its execution and prepares it to be garbage collected.
 DatagramSocket getControlSocket()
          Returns a reference to the DatagramSocket that a stream should use for control data (e.g.
 Socket getControlTCPSocket()
          Returns a reference to the Socket that a stream should use for control data (e.g.
 DatagramSocket getDataSocket()
          Returns a reference to the DatagramSocket that a stream should use for data (e.g.
 Socket getDataTCPSocket()
          Returns a reference to the Socket that a stream should use for data (e.g.
 StreamConnector.Protocol getProtocol()
          Returns the protocol of this StreamConnector.
 void started()
          Notifies this instance that utilization of its DatagramSockets for data and/or control traffic has started.
 void stopped()
          Notifies this instance that utilization of its DatagramSockets for data and/or control traffic has temporarily stopped.
 

Method Detail

getDataSocket

DatagramSocket getDataSocket()
Returns a reference to the DatagramSocket that a stream should use for data (e.g. RTP) traffic.

Returns:
a reference to the DatagramSocket that a stream should use for data (e.g. RTP) traffic or null if this StreamConnector does not handle UDP sockets.

getControlSocket

DatagramSocket getControlSocket()
Returns a reference to the DatagramSocket that a stream should use for control data (e.g. RTCP).

Returns:
a reference to the DatagramSocket that a stream should use for control data (e.g. RTCP) or null if this StreamConnector does not handle UDP sockets.

getDataTCPSocket

Socket getDataTCPSocket()
Returns a reference to the Socket that a stream should use for data (e.g. RTP) traffic.

Returns:
a reference to the Socket that a stream should use for data (e.g. RTP) traffic or null if this StreamConnector does not handle TCP sockets.

getControlTCPSocket

Socket getControlTCPSocket()
Returns a reference to the Socket that a stream should use for control data (e.g. RTCP).

Returns:
a reference to the Socket that a stream should use for control data (e.g. RTCP) or null if this StreamConnector does not handle TCP sockets.

getProtocol

StreamConnector.Protocol getProtocol()
Returns the protocol of this StreamConnector.

Returns:
the protocol of this StreamConnector

close

void close()
Releases the resources allocated by this instance in the course of its execution and prepares it to be garbage collected.


started

void started()
Notifies this instance that utilization of its DatagramSockets for data and/or control traffic has started.


stopped

void stopped()
Notifies this instance that utilization of its DatagramSockets for data and/or control traffic has temporarily stopped. This instance should be prepared to be started at a later time again though.


Jitsi: the OpenSource Java VoIP and Instant Messaging client.

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