T - The concrete builder class.public abstract static class ConnectionConfiguration.Builder<T extends ConnectionConfiguration.Builder<T>> extends Object
| Modifier and Type | Method and Description |
|---|---|
abstract ConnectionConfiguration |
build()
Builds the connection configuration.
|
T |
compressionMethods(CompressionMethod... compressionMethods)
Sets the compression method.
|
T |
connectTimeout(int connectTimeout)
Sets a timeout for the connection establishment.
|
T |
hostname(String hostname)
Sets the hostname.
|
T |
hostnameVerifier(HostnameVerifier hostnameVerifier)
Sets an optional hostname verifier, used to verify the hostname in the certificate presented by the server.
|
T |
port(int port)
Sets the port.
|
T |
proxy(Proxy proxy)
Sets the proxy, e.g. if you are behind a HTTP proxy and use a BOSH connection.
|
T |
secure(boolean secure)
Sets whether the connection is secured via SSL.
|
T |
sslContext(SSLContext sslContext)
Sets a custom SSL context, used to secure the connection.
|
public final T hostname(String hostname)
hostname - The hostname.public final T port(int port)
port - The port.public final T proxy(Proxy proxy)
proxy - The proxy.public final T secure(boolean secure)
secure - If the connection is secured via SSL.public final T sslContext(SSLContext sslContext)
sslContext - The SSL context.public final T hostnameVerifier(HostnameVerifier hostnameVerifier)
hostnameVerifier - The hostname verifier.public final T connectTimeout(int connectTimeout)
Connecting to a XMPP server involves multiple steps:
XMPP stream negotiation is configured via XmppSessionConfiguration.Builder.defaultResponseTimeout(int)
connectTimeout - The timeout in milliseconds.XmppSession.connect()public final T compressionMethods(CompressionMethod... compressionMethods)
compressionMethods - The compression methods.CompressionManager.ZLIB,
CompressionManager.GZIP,
CompressionManager.DEFLATEpublic abstract ConnectionConfiguration build()
Copyright © 2014–2015 XMPP.rocks. All rights reserved.