Class ICECandidate
java.lang.Object
org.jivesoftware.smackx.jingleold.nat.TransportCandidate
org.jivesoftware.smackx.jingleold.nat.ICECandidate
- All Implemented Interfaces:
 Comparable<ICECandidate>
ICE Transport candidate.
 A candidate represents the possible transport for data interchange between
 the two endpoints.
- 
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.jivesoftware.smackx.jingleold.nat.TransportCandidate
TransportCandidate.CandidateEcho, TransportCandidate.Channel, TransportCandidate.Fixed, TransportCandidate.Protocol - 
Field Summary
Fields inherited from class org.jivesoftware.smackx.jingleold.nat.TransportCandidate
password - 
Constructor Summary
ConstructorsConstructorDescriptionICECandidate(String ip, int generation, int network, String password, int port, String username, int preference, ICECandidate.Type type) Constructor with the basic elements of a transport definition. - 
Method Summary
Modifier and TypeMethodDescriptionvoidcheck(List<TransportCandidate> localCandidates) Check if a transport candidate is usable.intcompareTo(ICECandidate arg) Compare the to other Transport candidate.booleanGet the channel.getId()Get the ID.intGet the network interface used for this connection.intGet the preference number for this transportElement.getProto()Get the protocol used for the transmission.getType()Get the Candidate Type.Get the username for this transportElement in ICE.inthashCode()booleanisNull()Return true if the candidate is not valid.voidsetChannel(TransportCandidate.Channel channel) Set the channel for this transportElement.voidSet the ID.voidsetNetwork(int network) Set the interface for this connection.voidsetPreference(int preference) Set the preference order for this transportElement.voidSet the protocol for the transmission.voidsetType(ICECandidate.Type type) Set the Candidate Type.voidsetUsername(String username) Set the username for this transportElement in ICE.Methods inherited from class org.jivesoftware.smackx.jingleold.nat.TransportCandidate
addCandidateEcho, addListener, getCandidateEcho, getConnection, getGeneration, getIp, getListenersList, getLocalIp, getName, getPassword, getPort, getSessionId, getSymmetric, removeCandidateEcho, setConnection, setGeneration, setIp, setLocalIp, setName, setPassword, setPort, setSessionId, setSymmetric 
- 
Constructor Details
- 
ICECandidate
public ICECandidate() - 
ICECandidate
public ICECandidate(String ip, int generation, int network, String password, int port, String username, int preference, ICECandidate.Type type) Constructor with the basic elements of a transport definition.- Parameters:
 ip- the IP address to use as a local addressgeneration- used to keep track of the candidatesnetwork- used for diagnostics (used when the machine has several NICs)password- user name, as it is used in ICEport- the port at the candidate IP addressusername- user name, as it is used in ICEpreference- preference for this transportElement, as it is used in ICEtype- type as defined in ICE-12
 
 - 
 - 
Method Details
- 
getId
Get the ID.- Returns:
 - the id
 
 - 
setId
Set the ID.- Parameters:
 id- the id to set
 - 
getProto
Get the protocol used for the transmission.- Returns:
 - the protocol used for transmission
 
 - 
setProto
Set the protocol for the transmission.- Parameters:
 proto- the protocol to use
 - 
getNetwork
Get the network interface used for this connection.- Returns:
 - the interface number
 
 - 
setNetwork
Set the interface for this connection.- Parameters:
 network- the interface number
 - 
getUsername
Get the username for this transportElement in ICE.- Returns:
 - a username string
 
 - 
getChannel
Get the channel.- Returns:
 - the channel associated
 
 - 
setChannel
Set the channel for this transportElement.- Parameters:
 channel- the new channel
 - 
setUsername
Set the username for this transportElement in ICE.- Parameters:
 username- the username used in ICE
 - 
getPreference
Get the preference number for this transportElement.- Returns:
 - the preference for this transportElement
 
 - 
setPreference
Set the preference order for this transportElement.- Parameters:
 preference- a number identifying the preference (as defined in ICE)
 - 
getType
Get the Candidate Type.- Returns:
 - candidate Type
 
 - 
setType
Set the Candidate Type.- Parameters:
 type- candidate type.
 - 
check
Check if a transport candidate is usable. The transport resolver should check if the transport candidate the other endpoint has provided is usable. ICE Candidate can check connectivity using UDP echo Test.- Overrides:
 checkin classTransportCandidate- Parameters:
 localCandidates- a list of local candidates.
 - 
equals
- Overrides:
 equalsin classTransportCandidate
 - 
hashCode
 - 
isNull
Description copied from class:TransportCandidateReturn true if the candidate is not valid.- Overrides:
 isNullin classTransportCandidate- Returns:
 - true if the candidate is null.
 
 - 
compareTo
Compare the to other Transport candidate.- Specified by:
 compareToin interfaceComparable<ICECandidate>- Parameters:
 arg- another Transport candidate- Returns:
 - a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object
 
 
 -