Class S5bTransportMethod.Candidate
- java.lang.Object
-
- rocks.xmpp.extensions.jingle.transports.s5b.model.S5bTransportMethod.Candidate
-
- All Implemented Interfaces:
Comparable<S5bTransportMethod.Candidate>,Addressable,Socks5StreamHost
- Enclosing class:
- S5bTransportMethod
public static final class S5bTransportMethod.Candidate extends Object implements Socks5StreamHost, Comparable<S5bTransportMethod.Candidate>
The implementation of the<candidate/>element in theurn:xmpp:jingle:transports:s5b:1namespace.Candidates are possible stream hosts for the transport.
The best (preferred) candidate is the one, with the highest priority. Multiple candidates are naturally sorted by their priority (highest first).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classS5bTransportMethod.Candidate.TypeThe transport type.
-
Constructor Summary
Constructors Constructor Description Candidate(String cid, String hostname, int port, Jid jid, S5bTransportMethod.Candidate.Type type, int priority)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(S5bTransportMethod.Candidate o)StringgetCid()Gets the candidate id.StringgetHostname()Gets the candidate's hostname.JidgetJid()Gets the candidate's JID.intgetPort()Gets the port.intgetPriority()Gets the priority of this candidate.S5bTransportMethod.Candidate.TypegetType()Gets the transport type.
-
-
-
Constructor Detail
-
Candidate
public Candidate(String cid, String hostname, int port, Jid jid, S5bTransportMethod.Candidate.Type type, int priority)
- Parameters:
cid- The candidate id.hostname- The hostname.port- The port.jid- The JID.type- The type.priority- The priority, seecalculatePriority(Type, int).
-
-
Method Detail
-
getCid
public final String getCid()
Gets the candidate id.- Returns:
- The candidate id.
-
getHostname
public final String getHostname()
Gets the candidate's hostname.- Specified by:
getHostnamein interfaceSocks5StreamHost- Returns:
- The candidate's hostname.
-
getJid
public final Jid getJid()
Gets the candidate's JID.- Specified by:
getJidin interfaceAddressable- Returns:
- The candidate's JID.
-
getPort
public final int getPort()
Gets the port.- Specified by:
getPortin interfaceSocks5StreamHost- Returns:
- The port.
-
getPriority
public final int getPriority()
Gets the priority of this candidate.- Returns:
- The priority.
-
getType
public final S5bTransportMethod.Candidate.Type getType()
Gets the transport type.- Returns:
- The transport type.
-
compareTo
public final int compareTo(S5bTransportMethod.Candidate o)
- Specified by:
compareToin interfaceComparable<S5bTransportMethod.Candidate>
-
-