public static final class S5bTransportMethod.Candidate extends java.lang.Object implements Socks5StreamHost, java.lang.Comparable<S5bTransportMethod.Candidate>
The implementation of the <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(java.lang.String cid,
java.lang.String hostname,
int port,
Jid jid,
S5bTransportMethod.Candidate.Type type,
int priority) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(S5bTransportMethod.Candidate o) |
java.lang.String |
getCid()
Gets the candidate id.
|
java.lang.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.
|
public Candidate(java.lang.String cid, java.lang.String hostname, int port, 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 java.lang.String getCid()
Gets the candidate id.
public final java.lang.String getHostname()
Gets the candidate’s hostname.
getHostname
in interface Socks5StreamHost
public final Jid getJid()
Gets the candidate’s JID.
getJid
in interface Socks5StreamHost
public final int getPort()
Gets the port.
getPort
in interface Socks5StreamHost
public final int getPriority()
Gets the priority of this candidate.
public final S5bTransportMethod.Candidate.Type getType()
Gets the transport type.
public final int compareTo(S5bTransportMethod.Candidate o)
compareTo
in interface java.lang.Comparable<S5bTransportMethod.Candidate>
Copyright © 2014–2019 XMPP.rocks. All rights reserved.