|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.java.sip.communicator.service.neomedia.DefaultStreamConnector
public class DefaultStreamConnector
Represents a default implementation of StreamConnector which is
initialized with a specific pair of control and data DatagramSockets
and which closes them (if they exist) when its close() is invoked.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface net.java.sip.communicator.service.neomedia.StreamConnector |
|---|
StreamConnector.Protocol |
| Field Summary | |
|---|---|
static int |
BIND_RETRIES_DEFAULT_VALUE
The default number of binds that a Media Service Implementation should execute in case a port is already bound to (each retry would be on a new random port). |
static String |
BIND_RETRIES_PROPERTY_NAME
The name of the property containing the number of binds that a Media Service Implementation should execute in case a port is already bound to (each retry would be on a new port in the allowed boundaries). |
protected DatagramSocket |
controlSocket
The DatagramSocket that a stream should use for control data (e.g. |
protected DatagramSocket |
dataSocket
The DatagramSocket that a stream should use for data (e.g. |
static String |
MAX_PORT_NUMBER_PROPERTY_NAME
The name of the property that contains the maximum port number that we'd like our RTP managers to bind upon. |
static String |
MIN_PORT_NUMBER_PROPERTY_NAME
The name of the property that contains the minimum port number that we'd like our RTP managers to bind upon. |
| Constructor Summary | |
|---|---|
DefaultStreamConnector()
Initializes a new DefaultStreamConnector instance with no control and data DatagramSockets. |
|
DefaultStreamConnector(DatagramSocket dataSocket,
DatagramSocket controlSocket)
Initializes a new DefaultStreamConnector instance which is to represent a specific pair of control and data DatagramSockets. |
|
DefaultStreamConnector(InetAddress bindAddr)
Initializes a new DefaultStreamConnector instance with a specific bind InetAddress. |
|
| 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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int BIND_RETRIES_DEFAULT_VALUE
public static final String BIND_RETRIES_PROPERTY_NAME
public static final String MAX_PORT_NUMBER_PROPERTY_NAME
public static final String MIN_PORT_NUMBER_PROPERTY_NAME
protected DatagramSocket controlSocket
protected DatagramSocket dataSocket
| Constructor Detail |
|---|
public DefaultStreamConnector()
Suitable for extenders willing to delay the creation of the control and
data sockets. For example, they could override
getControlSocket() and/or getDataSocket() and create
them on demand.
public DefaultStreamConnector(InetAddress bindAddr)
MIN_PORT_NUMBER_PROPERTY_NAME and
MAX_PORT_NUMBER_PROPERTY_NAME at most
BIND_RETRIES_PROPERTY_NAME times.
bindAddr - the local InetAddress the new instance is to
attempt to bind to
public DefaultStreamConnector(DatagramSocket dataSocket,
DatagramSocket controlSocket)
dataSocket - the DatagramSocket to be used for data (e.g.
RTP) trafficcontrolSocket - the DatagramSocket to be used for control
data (e.g. RTCP) traffic| Method Detail |
|---|
public void close()
close in interface StreamConnectorStreamConnector.close()public DatagramSocket getControlSocket()
getControlSocket in interface StreamConnectorStreamConnector.getControlSocket()public DatagramSocket getDataSocket()
getDataSocket in interface StreamConnectorStreamConnector.getDataSocket()public Socket getDataTCPSocket()
getDataTCPSocket in interface StreamConnectorpublic Socket getControlTCPSocket()
getControlTCPSocket in interface StreamConnectorpublic StreamConnector.Protocol getProtocol()
getProtocol in interface StreamConnectorpublic void started()
started in interface StreamConnectorStreamConnector.started()public void stopped()
stopped in interface StreamConnectorStreamConnector.stopped()
|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||