public static final class BOSHClientConfig.Builder extends Object
BOSHClientConfig instance to be immutable while providing
flexibility when building new BOSHClientConfig instances.
Instances of this class are not thread-safe. If template-style
use is desired, see the create(BOSHClientConfig) method.| Modifier and Type | Method and Description |
|---|---|
BOSHClientConfig |
build()
Build the immutable object instance with the current configuration.
|
static BOSHClientConfig.Builder |
create(BOSHClientConfig cfg)
Creates a new builder instance using the existing configuration
provided as a starting point.
|
static BOSHClientConfig.Builder |
create(URI cmURI,
String domain)
Creates a new builder instance, used to create instances of the
BOSHClientConfig class. |
BOSHClientConfig.Builder |
setCompressionEnabled(boolean enabled)
Set whether or not compression of the underlying data stream
should be attempted.
|
BOSHClientConfig.Builder |
setFrom(String id)
Set the ID of the client station, to be forwarded to the connection
manager when new sessions are created.
|
BOSHClientConfig.Builder |
setProxy(String hostName,
int port)
Specify the hostname and port of an HTTP proxy to connect through.
|
BOSHClientConfig.Builder |
setRoute(String protocol,
String host,
int port)
Sets the destination server/domain that the client should connect to.
|
BOSHClientConfig.Builder |
setSSLContext(SSLContext ctx)
Set the SSL context to use for this session.
|
BOSHClientConfig.Builder |
setXMLLang(String lang)
Set the default language of any human-readable content within the
XML.
|
public static BOSHClientConfig.Builder create(URI cmURI, String domain)
BOSHClientConfig class.cmURI - URI to use to contact the connection managerdomain - target domain to communicate withpublic static BOSHClientConfig.Builder create(BOSHClientConfig cfg)
cfg - configuration to copypublic BOSHClientConfig.Builder setFrom(String id)
id - client IDpublic BOSHClientConfig.Builder setXMLLang(String lang)
lang - XML language IDpublic BOSHClientConfig.Builder setRoute(String protocol, String host, int port)
protocol - connection protocol (e.g, "xmpp")host - host or domain to be served by the remote server. Note
that this is not necessarily the host name or domain name of the
remote server.port - port number of the remote serverpublic BOSHClientConfig.Builder setProxy(String hostName, int port)
hostName - proxy hostnameport - proxy port numberpublic BOSHClientConfig.Builder setSSLContext(SSLContext ctx)
ctx - SSL contextpublic BOSHClientConfig.Builder setCompressionEnabled(boolean enabled)
enabled - set to true if compression should be
attempted when possible, false to disable compressionpublic BOSHClientConfig build()
Copyright © 2015. All rights reserved.