public final class XmppSessionConfiguration extends Object
XmppSession.
Most importantly it allows you to introduce custom extensions to your XmppSession, simply by passing your JAXB annotated classes to the builder of this class
and then use this configuration for the session.
Use the builder() to create instances of this class:
XmppSessionConfiguration configuration = XmppSessionConfiguration.builder()
.extensions(MyClass1.class, MyClass2.class)
.debugger(ConsoleDebugger.class)
.build();
This class is immutable.| Modifier and Type | Class and Description |
|---|---|
static class |
XmppSessionConfiguration.Builder
A builder to create an
XmppSessionConfiguration instance. |
| Modifier and Type | Method and Description |
|---|---|
static XmppSessionConfiguration.Builder |
builder()
Creates a builder for this class.
|
List<String> |
getAuthenticationMechanisms()
Gets the preferred authentication (SASL) mechanisms.
|
Path |
getCacheDirectory()
Gets the caching directory for directory-based caches used for:
XEP-0084: User Avatar
XEP-0115: Entity Capabilities
XEP-0153: vCard-Based Avatars
By default this directory is called
xmpp.rocks and is located in the operating system's application data folder:For Windows it is %APPDATA%, which usually is C:\Users\{USERNAME}\AppData\RoamingFor Mac it is ~/Library/Application SupportElse it is the user's home directory. |
Class<? extends XmppDebugger> |
getDebugger()
Gets the current debugger for this session.
|
static XmppSessionConfiguration |
getDefault()
Gets the default configuration.
|
Duration |
getDefaultResponseTimeout()
Gets the response timeout.
|
Supplier<Presence> |
getInitialPresence()
Gets a supplier for initial presence which is sent during login.
|
Locale |
getLanguage()
Gets the preferred or default language for any human-readable XML character data to be sent over the stream.
|
String |
getNameServer()
Gets the name server used for resolving DNS SRV and TXT records during connecting.
|
ReconnectionStrategy |
getReconnectionStrategy()
Gets the reconnection strategy.
|
XMLInputFactory |
getXmlInputFactory()
Gets the XML input factory.
|
XMLOutputFactory |
getXmlOutputFactory()
Gets the XML output factory.
|
static void |
setDefault(XmppSessionConfiguration configuration)
Sets the default configuration.
|
public static XmppSessionConfiguration getDefault()
public static void setDefault(XmppSessionConfiguration configuration)
configuration - The default configuration.public static XmppSessionConfiguration.Builder builder()
public final Class<? extends XmppDebugger> getDebugger()
ConsoleDebugger.public final Duration getDefaultResponseTimeout()
public final List<String> getAuthenticationMechanisms()
XmppSessionConfiguration.Builder.authenticationMechanisms(String...)public final Path getCacheDirectory()
xmpp.rocks and is located in the operating system's application data folder:
For Windows it is %APPDATA%, which usually is C:\Users\{USERNAME}\AppData\Roaming
For Mac it is ~/Library/Application Support
Else it is the user's home directory.
public final Supplier<Presence> getInitialPresence()
public final Locale getLanguage()
public final ReconnectionStrategy getReconnectionStrategy()
public final String getNameServer()
public final XMLInputFactory getXmlInputFactory()
public final XMLOutputFactory getXmlOutputFactory()
Copyright © 2014–2018 XMPP.rocks. All rights reserved.