public static final class S5bTransportMethod.Candidate extends Object implements Socks5StreamHost, Comparable<S5bTransportMethod.Candidate>
<candidate/> element in the urn: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).
| Modifier and Type | Class and Description |
|---|---|
static class |
S5bTransportMethod.Candidate.Type
The transport type.
|
| Constructor and Description |
|---|
Candidate(String cid,
String hostname,
int port,
rocks.xmpp.addr.Jid jid,
S5bTransportMethod.Candidate.Type type,
int priority) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(S5bTransportMethod.Candidate o) |
String |
getCid()
Gets the candidate id.
|
String |
getHostname()
Gets the candidate's hostname.
|
rocks.xmpp.addr.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.
|
public Candidate(String cid, String hostname, int port, rocks.xmpp.addr.Jid jid, S5bTransportMethod.Candidate.Type type, int priority)
cid - The candidate id.hostname - The hostname.port - The port.jid - The JID.type - The type.priority - The priority, see calculatePriority(Type, int).public final String getCid()
public final String getHostname()
getHostname in interface Socks5StreamHostpublic final rocks.xmpp.addr.Jid getJid()
getJid in interface Socks5StreamHostpublic final int getPort()
getPort in interface Socks5StreamHostpublic final int getPriority()
public final S5bTransportMethod.Candidate.Type getType()
public final int compareTo(S5bTransportMethod.Candidate o)
compareTo in interface Comparable<S5bTransportMethod.Candidate>Copyright © 2014–2017 XMPP.rocks. All rights reserved.