public final class SmackConfiguration
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
SmackConfiguration.UnknownIqRequestReplyMode |
| Modifier and Type | Field and Description |
|---|---|
static boolean |
DEBUG
Value that indicates whether debugging is enabled.
|
static java.net.URL |
SMACK_URL |
static java.lang.String |
SMACK_URL_STRING |
static boolean |
TRUELY_ASYNC_SENDS
If enabled, causes
AbstractXMPPConnection to create a thread for every asynchronous send operation. |
| Constructor and Description |
|---|
SmackConfiguration() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addAllKnownModulesTo(ModularXmppClientToServerConnectionConfiguration.Builder builder) |
static void |
addCompressionHandler(XMPPInputOutputStream xmppInputOutputStream) |
static void |
addDisabledSmackClass(java.lang.Class<?> clz)
Convenience method for
addDisabledSmackClass(String). |
static void |
addDisabledSmackClass(java.lang.String className)
Add a class to the disabled smack classes.
|
static void |
addDisabledSmackClasses(java.lang.String... classNames)
Add the given class names to the list of disabled Smack classes.
|
static boolean |
addModule(java.lang.Class<? extends ModularXmppClientToServerConnectionModuleDescriptor> moduleDescriptor) |
static void |
addSaslMech(java.lang.String mech)
Add a SASL mechanism to the list to be used.
|
static void |
addSaslMechs(java.util.Collection<java.lang.String> mechs)
Add a Collection of SASL mechanisms to the list to be used.
|
static java.util.List<XMPPInputOutputStream> |
getCompressionHandlers()
Get compression handlers.
|
static int |
getDefaultConcurrencyLevelLimit() |
static ParsingExceptionCallback |
getDefaultParsingExceptionCallback()
Returns the default parsing exception callback.
|
static int |
getDefaultReplyTimeout()
Returns the number of milliseconds to wait for a response from
the server.
|
static SmackDebuggerFactory |
getDefaultSmackDebuggerFactory() |
static java.util.List<java.lang.String> |
getSaslMechs()
Returns the list of SASL mechanisms to be used.
|
static int |
getStanzaCollectorSize()
Gets the default max size of a stanza collector before it will delete
the older packets.
|
static SmackConfiguration.UnknownIqRequestReplyMode |
getUnknownIqRequestReplyMode() |
static java.lang.String |
getVersion()
Deprecated.
use
Smack.getVersion() instead. |
static boolean |
isDisabledSmackClass(java.lang.String className) |
static boolean |
isSmackInitialized()
Check if Smack was successfully initialized.
|
static void |
removeSaslMech(java.lang.String mech)
Remove a SASL mechanism from the list to be used.
|
static void |
removeSaslMechs(java.util.Collection<java.lang.String> mechs)
Remove a Collection of SASL mechanisms to the list to be used.
|
static void |
setDefaultHostnameVerifier(javax.net.ssl.HostnameVerifier verifier)
Set the default HostnameVerifier that will be used by XMPP connections to verify the hostname
of a TLS certificate.
|
static void |
setDefaultParsingExceptionCallback(ParsingExceptionCallback callback)
Set the default parsing exception callback for all newly created connections.
|
static void |
setDefaultReplyTimeout(int timeout)
Sets the number of milliseconds to wait for a response from
the server.
|
static void |
setDefaultSmackDebuggerFactory(SmackDebuggerFactory debuggerFactory) |
static void |
setStanzaCollectorSize(int collectorSize)
Sets the default max size of a stanza collector before it will delete
the older packets.
|
static void |
setUnknownIqRequestReplyMode(SmackConfiguration.UnknownIqRequestReplyMode unknownIqRequestReplyMode) |
public static final java.lang.String SMACK_URL_STRING
public static final java.net.URL SMACK_URL
public static boolean DEBUG
smack.debugEnabled to true. The system property can be set on the
command line such as "java SomeApp -Dsmack.debugEnabled=true".public static boolean TRUELY_ASYNC_SENDS
AbstractXMPPConnection to create a thread for every asynchronous send operation. This
is meant to work-around a shortcoming of Smack 4.4, where certain send operations are not asynchronous even if
they should be. This is an expert setting, do not toggle if you do not understand the consequences or have been
told to do so. Note that it is expected that this will not be needed in future Smack versions.@Deprecated public static java.lang.String getVersion()
Smack.getVersion() instead.public static int getDefaultReplyTimeout()
public static void setDefaultReplyTimeout(int timeout)
timeout - the milliseconds to wait for a response from the serverpublic static void setDefaultSmackDebuggerFactory(SmackDebuggerFactory debuggerFactory)
public static SmackDebuggerFactory getDefaultSmackDebuggerFactory()
public static int getStanzaCollectorSize()
public static void setStanzaCollectorSize(int collectorSize)
collectorSize - the number of packets to queue before deleting older packets.public static void addSaslMech(java.lang.String mech)
mech - the SASL mechanism to be addedpublic static void addSaslMechs(java.util.Collection<java.lang.String> mechs)
mechs - the Collection of SASL mechanisms to be addedpublic static void removeSaslMech(java.lang.String mech)
mech - the SASL mechanism to be removedpublic static void removeSaslMechs(java.util.Collection<java.lang.String> mechs)
mechs - the Collection of SASL mechanisms to be removedpublic static java.util.List<java.lang.String> getSaslMechs()
public static void setDefaultParsingExceptionCallback(ParsingExceptionCallback callback)
callback - TODO javadoc me pleaseParsingExceptionCallbackpublic static ParsingExceptionCallback getDefaultParsingExceptionCallback()
ParsingExceptionCallbackpublic static void addCompressionHandler(XMPPInputOutputStream xmppInputOutputStream)
public static java.util.List<XMPPInputOutputStream> getCompressionHandlers()
public static void setDefaultHostnameVerifier(javax.net.ssl.HostnameVerifier verifier)
ConnectionConfiguration.Builder.setHostnameVerifier(HostnameVerifier).verifier - HostnameVerifierpublic static void addDisabledSmackClass(java.lang.Class<?> clz)
addDisabledSmackClass(String).clz - the Smack class to disablepublic static void addDisabledSmackClass(java.lang.String className)
className can also be a package name, in this case, the entire
package is disabled (but can be manually enabled).
className - TODO javadoc me pleasepublic static void addDisabledSmackClasses(java.lang.String... classNames)
classNames - the Smack classes to disable.addDisabledSmackClass(String)public static boolean isDisabledSmackClass(java.lang.String className)
public static boolean isSmackInitialized()
public static SmackConfiguration.UnknownIqRequestReplyMode getUnknownIqRequestReplyMode()
public static void setUnknownIqRequestReplyMode(SmackConfiguration.UnknownIqRequestReplyMode unknownIqRequestReplyMode)
public static int getDefaultConcurrencyLevelLimit()
public static boolean addModule(java.lang.Class<? extends ModularXmppClientToServerConnectionModuleDescriptor> moduleDescriptor)
public static void addAllKnownModulesTo(ModularXmppClientToServerConnectionConfiguration.Builder builder)