public interface Connection
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(ConnectionListener listener)
Adds connection state listener.
|
void |
generateCname()
Generates a unique CNAME for the connection and its channels.
Only applicable to RTP connections! |
void |
generateOffer(boolean webrtc)
Generates the local connection descriptor and allocates the necessary resources.
|
long |
getBytesReceived()
The total number of bytes received .
|
long |
getBytesTransmitted()
The total number of bytes transmitted.
|
String |
getCname()
Gets the CNAME of the connection.
|
String |
getDescriptor()
Gets the descriptor of this connection in SDP format.
|
Endpoint |
getEndpoint()
Gets the endpoint which executes this connection.
|
int |
getId()
Gets the identifier of this connection.
|
boolean |
getIsLocal()
Gets whether connection should be bound to local or remote interface ,
supported only for rtp connections.
|
double |
getJitter()
The average jitter value accross all media types.
|
String |
getLocalDescriptor()
Gets the local descriptor of this connection in SDP format
|
ConnectionMode |
getMode()
Gets the current mode of this connection.
|
long |
getPacketsReceived()
The number of packets of the specified media type received .
|
long |
getPacketsTransmitted()
The number of packets of the specified media type transmitted.
|
String |
getRemoteDescriptor()
Gets the remote descriptor of this connection in SDP format
|
ConnectionState |
getState()
Returns state of this connection
|
String |
getTextualId()
Gets the identifier of this connection.
|
boolean |
isAvailable()
Checks whether a connection has finished gathering all necessary
resources and is ready to use.
|
void |
removeListener(ConnectionListener listener)
Removes connection state listener.
|
void |
setConnectionFailureListener(ConnectionFailureListener connectionFailureListener)
Sets connection failure listener.
|
void |
setEndpoint(Endpoint endpoint)
Sets the endpoint which executes this connection.
|
void |
setIsLocal(boolean isLocal)
Gets whether connection should be bound to local or remote interface ,
supported only for rtp connections.
|
void |
setMode(ConnectionMode mode)
Modify mode of this connection for all known media types.
|
void |
setOtherParty(byte[] descriptor)
Joins endpoint which executes this connection with other party.
|
void |
setOtherParty(Connection other)
Joins endpoint wich executes this connection with other party.
|
void |
setOtherParty(Text descriptor)
Joins endpoint which executes this connection with other party.
|
int getId()
String getTextualId()
boolean getIsLocal()
void setIsLocal(boolean isLocal)
ConnectionState getState()
ConnectionMode getMode()
void setMode(ConnectionMode mode) throws ModeNotSupportedException
mode - the new mode of the connection.ModeNotSupportedExceptionvoid setEndpoint(Endpoint endpoint)
the - endpoint object.Endpoint getEndpoint()
String getDescriptor()
String getLocalDescriptor()
String getRemoteDescriptor()
void generateOffer(boolean webrtc)
throws IOException
webrtc - Whether the offer should be WebRTC compatible or not.IOExceptionvoid setOtherParty(Connection other) throws IOException
other - the connection executed by other party endpoint.IOExceptionvoid setOtherParty(byte[] descriptor)
throws IOException
descriptor - the SDP descriptor of the other party.IOExceptionvoid setOtherParty(Text descriptor) throws IOException
descriptor - the SDP descriptor of the other party.IOExceptionvoid addListener(ConnectionListener listener)
listener - to be registeredvoid setConnectionFailureListener(ConnectionFailureListener connectionFailureListener)
listener - to be registeredvoid removeListener(ConnectionListener listener)
listener - to be unregisteredlong getPacketsReceived()
media - the media type.long getBytesReceived()
long getPacketsTransmitted()
media - the media typelong getBytesTransmitted()
double getJitter()
boolean isAvailable()
void generateCname()
String getCname()
Copyright © 2016 TeleStax, Inc.. All Rights Reserved.