public static final class XmppSessionConfiguration.Builder extends Object
XmppSessionConfiguration instance.| Modifier and Type | Method and Description |
|---|---|
XmppSessionConfiguration.Builder |
authenticationMechanisms(String... authenticationMechanisms)
Sets the preferred mechanisms used for this XMPP session.
|
XmppSessionConfiguration |
build()
Builds the configuration.
|
XmppSessionConfiguration.Builder |
cacheDirectory(Path path)
Sets the caching directory for directory-based caches used for:
XEP-0084: User Avatar
XEP-0115: Entity Capabilities
XEP-0153: vCard-Based Avatars
If you want to disable the use of directory caching, pass null.
|
XmppSessionConfiguration.Builder |
debugger(Class<? extends XmppDebugger> xmppDebugger)
Sets the debugger.
|
XmppSessionConfiguration.Builder |
defaultResponseTimeout(Duration defaultResponseTimeout)
Sets the default response timeout for synchronous calls, usually IQ calls.
|
XmppSessionConfiguration.Builder |
defaultResponseTimeout(int defaultResponseTimeout)
Deprecated.
|
XmppSessionConfiguration.Builder |
extensions(Extension... extensions)
Adds extensions to the session.
|
XmppSessionConfiguration.Builder |
initialPresence(Supplier<Presence> presenceSupplier)
Sets a supplier for initial presence which is sent during login.
|
XmppSessionConfiguration.Builder |
language(Locale language)
Sets the preferred or default language for any human-readable XML character data to be sent over the stream.
|
XmppSessionConfiguration.Builder |
nameServer(String nameServer)
Sets the name server used for resolving DNS SRV and TXT records during connecting.
|
XmppSessionConfiguration.Builder |
reconnectionStrategy(ReconnectionStrategy reconnectionStrategy)
Sets the reconnection strategy, which determined when to reconnect after a disconnection.
|
public final XmppSessionConfiguration.Builder debugger(Class<? extends XmppDebugger> xmppDebugger)
xmppDebugger - The debugger or null, if you don't want to use a debugger.public final XmppSessionConfiguration.Builder extensions(Extension... extensions)
extensions - The extensions.@Deprecated public final XmppSessionConfiguration.Builder defaultResponseTimeout(int defaultResponseTimeout)
defaultResponseTimeout(Duration)defaultResponseTimeout - The default response timeout.public final XmppSessionConfiguration.Builder defaultResponseTimeout(Duration defaultResponseTimeout)
defaultResponseTimeout - The default response timeout.public final XmppSessionConfiguration.Builder authenticationMechanisms(String... authenticationMechanisms)
Any entity that will act as a SASL client or a SASL server MUST maintain an ordered list of its preferred SASL mechanisms according to the client or server, where the list is ordered according to local policy or user configuration (which SHOULD be in order of perceived strength to enable the strongest authentication possible). The initiating entity MUST maintain its own preference order independent of the preference order of the receiving entity. A client MUST try SASL mechanisms in its preference order. For example, if the server offers the ordered list "PLAIN SCRAM-SHA-1 GSSAPI" or "SCRAM-SHA-1 GSSAPI PLAIN" but the client's ordered list is "GSSAPI SCRAM-SHA-1", the client MUST try GSSAPI first and then SCRAM-SHA-1 but MUST NOT try PLAIN (since PLAIN is not on its list).
authenticationMechanisms - The preferred mechanisms.public final XmppSessionConfiguration.Builder cacheDirectory(Path path)
path - The directory.XmppSessionConfiguration.getCacheDirectory()public final XmppSessionConfiguration.Builder initialPresence(Supplier<Presence> presenceSupplier)
presenceSupplier - The presence supplier.public final XmppSessionConfiguration.Builder language(Locale language)
language - The language.public final XmppSessionConfiguration.Builder reconnectionStrategy(ReconnectionStrategy reconnectionStrategy)
reconnectionStrategy - The reconnection strategy.public final XmppSessionConfiguration.Builder nameServer(String nameServer)
For Oracle JDK, you could use one of sun.net.dns.ResolverConfiguration.open().nameservers().
If no name server is set, Google DNS Server (8.8.8.8) is used.
nameServer - The name server.public final XmppSessionConfiguration build()
Copyright © 2014–2018 XMPP.rocks. All rights reserved.