T - The concrete builder class.public abstract static class ConnectionConfiguration.Builder<T extends ConnectionConfiguration.Builder<T>> extends Object
| Modifier | Constructor and Description |
|---|---|
protected |
Builder() |
| Modifier and Type | Method and Description |
|---|---|
abstract ConnectionConfiguration |
build()
Builds the connection configuration.
|
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.
|
protected abstract T |
self()
Returns an instance of the concrete builder.
|
T |
sslContext(SSLContext sslContext)
Sets a custom SSL context, used to secure the connection.
|
protected abstract T self()
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 abstract ConnectionConfiguration build()
Copyright © 2014 XMPP.rocks. All rights reserved.