public final class SmackConfiguration extends 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.
|
Constructor and Description |
---|
SmackConfiguration() |
Modifier and Type | Method and Description |
---|---|
static void |
addCompressionHandler(XMPPInputOutputStream xmppInputOutputStream) |
static void |
addDisabledSmackClass(Class<?> clz)
Convenience method for
addDisabledSmackClass(String) . |
static void |
addDisabledSmackClass(String className)
Add a class to the disabled smack classes.
|
static void |
addDisabledSmackClasses(String... classNames)
Add the given class names to the list of disabled Smack classes.
|
static void |
addSaslMech(String mech)
Add a SASL mechanism to the list to be used.
|
static void |
addSaslMechs(Collection<String> mechs)
Add a Collection of SASL mechanisms to the list to be used.
|
static List<XMPPInputOutputStream> |
getCompresionHandlers()
Deprecated.
use
getCompressionHandlers() instead. |
static List<XMPPInputOutputStream> |
getCompressionHandlers() |
static int |
getDefaultPacketReplyTimeout()
Deprecated.
use
getDefaultReplyTimeout() instead. |
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 List<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 String |
getVersion()
Returns the Smack version information, eg "1.3.0".
|
static boolean |
isDisabledSmackClass(String className) |
static boolean |
isSmackInitialized()
Check if Smack was successfully initialized.
|
static void |
removeSaslMech(String mech)
Remove a SASL mechanism from the list to be used.
|
static void |
removeSaslMechs(Collection<String> mechs)
Remove a Collection of SASL mechanisms to the list to be used.
|
static void |
setDefaultHostnameVerifier(HostnameVerifier verifier)
Set the default HostnameVerifier that will be used by XMPP connections to verify the hostname
of a TLS certificate.
|
static void |
setDefaultPacketReplyTimeout(int timeout)
Deprecated.
use
setDefaultReplyTimeout(int) instead. |
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 boolean DEBUG
public SmackConfiguration()
public static String getVersion()
@Deprecated public static int getDefaultPacketReplyTimeout()
getDefaultReplyTimeout()
instead.@Deprecated public static void setDefaultPacketReplyTimeout(int timeout)
setDefaultReplyTimeout(int)
instead.timeout
- the milliseconds to wait for a response from the serverpublic 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(String mech)
mech
- the SASL mechanism to be addedpublic static void addSaslMechs(Collection<String> mechs)
mechs
- the Collection of SASL mechanisms to be addedpublic static void removeSaslMech(String mech)
mech
- the SASL mechanism to be removedpublic static void removeSaslMechs(Collection<String> mechs)
mechs
- the Collection of SASL mechanisms to be removedpublic static List<String> getSaslMechs()
public static void setDefaultParsingExceptionCallback(ParsingExceptionCallback callback)
callback
- ParsingExceptionCallback
public static ParsingExceptionCallback getDefaultParsingExceptionCallback()
ParsingExceptionCallback
public static void addCompressionHandler(XMPPInputOutputStream xmppInputOutputStream)
@Deprecated public static List<XMPPInputOutputStream> getCompresionHandlers()
getCompressionHandlers()
instead.public static List<XMPPInputOutputStream> getCompressionHandlers()
public static void setDefaultHostnameVerifier(HostnameVerifier verifier)
ConnectionConfiguration.Builder.setHostnameVerifier(HostnameVerifier)
.verifier
- HostnameVerifierpublic static void addDisabledSmackClass(Class<?> clz)
addDisabledSmackClass(String)
.clz
- the Smack class to disablepublic static void addDisabledSmackClass(String className)
className
can also be a package name, in this case, the entire
package is disabled (but can be manually enabled).
className
- public static void addDisabledSmackClasses(String... classNames)
classNames
- the Smack classes to disable.addDisabledSmackClass(String)
public static boolean isDisabledSmackClass(String className)
public static boolean isSmackInitialized()
public static SmackConfiguration.UnknownIqRequestReplyMode getUnknownIqRequestReplyMode()
public static void setUnknownIqRequestReplyMode(SmackConfiguration.UnknownIqRequestReplyMode unknownIqRequestReplyMode)