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:1
namespace.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 class
S5bTransportMethod.Candidate.Type
The 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 int
compareTo(S5bTransportMethod.Candidate o)
String
getCid()
Gets the candidate id.String
getHostname()
Gets the candidate's hostname.Jid
getJid()
Gets the candidate's JID.int
getPort()
Gets the port.int
getPriority()
Gets the priority of this candidate.S5bTransportMethod.Candidate.Type
getType()
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:
getHostname
in interfaceSocks5StreamHost
- Returns:
- The candidate's hostname.
-
getJid
public final Jid getJid()
Gets the candidate's JID.- Specified by:
getJid
in interfaceAddressable
- Returns:
- The candidate's JID.
-
getPort
public final int getPort()
Gets the port.- Specified by:
getPort
in 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:
compareTo
in interfaceComparable<S5bTransportMethod.Candidate>
-
-