Package org.jitsi.service.neomedia
Interface StreamConnector
-
- All Known Implementing Classes:
DefaultStreamConnector,DefaultTCPStreamConnector,StreamConnectorDelegate
public interface StreamConnectorThe 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
Nested Classes Modifier and Type Interface Description static classStreamConnector.ProtocolEnumerates the protocols supported by StreamConnector.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()Releases the resources allocated by this instance in the course of its execution and prepares it to be garbage collected.DatagramSocketgetControlSocket()Returns a reference to the DatagramSocket that a stream should use for control data (e.g.SocketgetControlTCPSocket()Returns a reference to the Socket that a stream should use for control data (e.g.DatagramSocketgetDataSocket()Returns a reference to the DatagramSocket that a stream should use for data (e.g.SocketgetDataTCPSocket()Returns a reference to the Socket that a stream should use for data (e.g.StreamConnector.ProtocolgetProtocol()Returns the protocol of this StreamConnector.booleanisRtcpmux()Returns true if this StreamConnector uses rtcp-mux, that is, if its data and control sockets share the same local address and port.voidstarted()Notifies this instance that utilization of its DatagramSockets for data and/or control traffic has started.voidstopped()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.
-
isRtcpmux
boolean isRtcpmux()
Returns true if this StreamConnector uses rtcp-mux, that is, if its data and control sockets share the same local address and port.- Returns:
- true if this StreamConnector uses rtcp-mux, that is, if its data and control sockets share the same local address and port.
-
-