Package org.igniterealtime.jbosh
Class BOSHClientConfig
java.lang.Object
org.igniterealtime.jbosh.BOSHClientConfig
BOSH client configuration information. Instances of this class contain
all information necessary to establish connectivity with a remote
connection manager.
Instances of this class are immutable, thread-safe,
and can be re-used to configure multiple client session instances.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
Class instance builder, after the builder pattern. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final boolean
Flag indicating that compression should be attempted, if possible.private final String
Client ID of this station.private final String
Default XML language.private final String
Proxy host.private final int
Proxy port.private final String
Routing information for messages sent to CM.private final SSLContext
SSL context.private final String
Target domain.private final URI
Connection manager URI. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
BOSHClientConfig
(URI cURI, String cDomain, String cFrom, String cLang, String cRoute, String cProxyHost, int cProxyPort, SSLContext cSSLContext, boolean cCompression) Prevent direct construction. -
Method Summary
Modifier and TypeMethodDescriptiongetFrom()
Get the ID of the local client.getLang()
Get the default language of any human-readable content within the XML.Get the HTTP proxy host to use.int
Get the HTTP proxy port to use.getRoute()
Get the routing information for messages sent to the CM.Get the SSL context to use for this session.getTo()
Get the ID of the target domain.getURI()
Get the URI to use to contact the connection manager.(package private) boolean
Determines whether or not compression of the underlying data stream should be attempted/allowed.
-
Field Details
-
uri
Connection manager URI. -
to
Target domain. -
from
Client ID of this station. -
lang
Default XML language. -
route
Routing information for messages sent to CM. -
proxyHost
Proxy host. -
proxyPort
private final int proxyPortProxy port. -
sslContext
SSL context. -
compressionEnabled
private final boolean compressionEnabledFlag indicating that compression should be attempted, if possible.
-
-
Constructor Details
-
BOSHClientConfig
private BOSHClientConfig(URI cURI, String cDomain, String cFrom, String cLang, String cRoute, String cProxyHost, int cProxyPort, SSLContext cSSLContext, boolean cCompression) Prevent direct construction.- Parameters:
cURI
- URI of the connection manager to connect tocDomain
- the target domain of the first streamcFrom
- client IDcLang
- default XML languagecRoute
- target routecProxyHost
- proxy hostcProxyPort
- proxy portcSSLContext
- SSL contextcCompression
- compression enabled flag
-
-
Method Details
-
getURI
Get the URI to use to contact the connection manager.- Returns:
- connection manager URI.
-
getTo
Get the ID of the target domain.- Returns:
- domain id
-
getFrom
Get the ID of the local client.- Returns:
- client id, or
null
-
getLang
Get the default language of any human-readable content within the XML. Defaults to "en".- Returns:
- XML language ID
-
getRoute
Get the routing information for messages sent to the CM.- Returns:
- route attribute string, or
null
if no routing info was provided.
-
getProxyHost
Get the HTTP proxy host to use.- Returns:
- proxy host, or
null
if no proxy information was specified
-
getProxyPort
public int getProxyPort()Get the HTTP proxy port to use.- Returns:
- proxy port, or 0 if no proxy information was specified
-
getSSLContext
Get the SSL context to use for this session.- Returns:
- SSL context instance to use, or
null
if no context instance was provided.
-
isCompressionEnabled
boolean isCompressionEnabled()Determines whether or not compression of the underlying data stream should be attempted/allowed. Defaults tofalse
.- Returns:
true
if compression should be attempted,false
if compression is disabled or was not specified
-