Class TransportCandidate
java.lang.Object
org.jivesoftware.smackx.jingleold.nat.TransportCandidate
- Direct Known Subclasses:
ICECandidate
,TransportCandidate.Fixed
Transport candidate.
A candidate represents the possible transport for data interchange between
the two endpoints.
-
Nested Class Summary
Modifier and TypeClassDescriptionclass
static class
Type-safe enum for the transportElement channel.static class
Fixed transport candidate.static final class
Type-safe enum for the transportElement protocol. -
Field Summary
-
Constructor Summary
ConstructorDescriptionEmpty constructor.TransportCandidate
(String ip, int port) Constructor with IP address and port.TransportCandidate
(String ip, int port, int generation) Constructor with IP address and port. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addCandidateEcho
(JingleSession session) void
Add a transport resolver listener.void
check
(List<TransportCandidate> localCandidates) Check if a transport candidate is usable.boolean
Get the XMPPConnection use to send or receive this candidate.int
Get the generation for a transportElement definition.getIp()
Get the list of listeners.Get local IP to bind to this candidate.getName()
Get the name used for identifying this transportElement method (optional).Get the password used by ICE or relayed candidate.int
getPort()
Get the port, or 0 for any port.Get the jingle's sessionId that is using this candidate.Get the symmetric candidate for this candidate if it exists.boolean
isNull()
Return true if the candidate is not valid.void
void
setConnection
(XMPPConnection connection) Set the XMPPConnection use to send or receive this candidate.void
setGeneration
(int generation) Set the generation for a transportElement definition.void
Set the IP address.void
setLocalIp
(String localIp) Set local IP to bind to this candidate.void
Set a name for identifying this transportElement.void
setPassword
(String password) Set the password used by ICE or relayed candidate.void
setPort
(int port) Set the port, using 0 for any port.void
setSessionId
(String sessionId) Set the jingle's sessionId that is using this candidate.void
setSymmetric
(TransportCandidate symmetric) Set the symmetric candidate for this candidate.
-
Field Details
-
password
-
-
Constructor Details
-
TransportCandidate
public TransportCandidate()Empty constructor. -
TransportCandidate
Constructor with IP address and port.- Parameters:
ip
- The IP address.port
- The port number.
-
TransportCandidate
Constructor with IP address and port.- Parameters:
ip
- The IP address.port
- The port number.generation
- The generation
-
-
Method Details
-
addCandidateEcho
- Throws:
SocketException
UnknownHostException
-
removeCandidateEcho
-
getCandidateEcho
-
getIp
-
setIp
Set the IP address.- Parameters:
ip
- the IP address
-
getLocalIp
Get local IP to bind to this candidate.- Returns:
- the local IP
-
setLocalIp
Set local IP to bind to this candidate.- Parameters:
localIp
- TODO javadoc me please
-
getSymmetric
Get the symmetric candidate for this candidate if it exists.- Returns:
- the symmetric candidate
-
setSymmetric
Set the symmetric candidate for this candidate.- Parameters:
symmetric
- TODO javadoc me please
-
getPassword
Get the password used by ICE or relayed candidate.- Returns:
- a password
-
setPassword
Set the password used by ICE or relayed candidate.- Parameters:
password
- a password
-
getConnection
Get the XMPPConnection use to send or receive this candidate.- Returns:
- the connection
-
setConnection
Set the XMPPConnection use to send or receive this candidate.- Parameters:
connection
- TODO javadoc me please
-
getSessionId
Get the jingle's sessionId that is using this candidate.- Returns:
- the session ID
-
setSessionId
Set the jingle's sessionId that is using this candidate.- Parameters:
sessionId
- TODO javadoc me please
-
isNull
Return true if the candidate is not valid.- Returns:
- true if the candidate is null.
-
getPort
Get the port, or 0 for any port.- Returns:
- the port or 0
-
setPort
Set the port, using 0 for any port.- Parameters:
port
- the port
-
getGeneration
Get the generation for a transportElement definition.- Returns:
- the generation
-
setGeneration
Set the generation for a transportElement definition.- Parameters:
generation
- the generation number
-
getName
Get the name used for identifying this transportElement method (optional).- Returns:
- a name used for identifying this transportElement (ie, "myrtpvoice1")
-
setName
Set a name for identifying this transportElement.- Parameters:
name
- the name used for the transportElement
-
equals
-
check
Check if a transport candidate is usable. The transport resolver should check if the transport candidate the other endpoint has provided is usable. Subclasses should provide better methods if they can...- Parameters:
localCandidates
- a list of local candidates.
-
getListenersList
Get the list of listeners.- Returns:
- the list of listeners
-
addListener
Add a transport resolver listener.- Parameters:
li
- The transport resolver listener to be added.
-