Commit Graph

18 Commits

Author SHA1 Message Date
Florian Schmaus 91fd15ad86 Prefix subprojects with 'smack-'
instead of using the old baseName=smack appendix=project.name approach,
we are now going convention over configuration and renaming the
subprojects directories to the proper name.

Having a prefix is actually very helpful, because the resulting
libraries will be named like the subproject. And a core-4.0.0-rc1.jar is
not as explicit about what it actually *is* as a
smack-core-4.0.0-rc1.jar.

SMACK-265
2014-04-28 19:44:14 +02:00
Florian Schmaus 4a60a68802 Move DEBUG_ENABLED from XMPPConnection to SmackConfiguration 2014-04-03 13:10:30 +02:00
Florian Schmaus 17a254edca Fix SmackConfiguration disabledSmackClasses
contains() should ckeck against 'classToLoad' not 'name'.
2014-03-28 14:46:30 +01:00
Florian Schmaus a83b44e102 Add support for CustomSmackConfiguration class
with DISABLED_SMACK_CLASSES String[] option.
2014-03-28 14:46:30 +01:00
Florian Schmaus a1227b78cc Fix log message in SmackConfiguration
Those startup classes could be specified in other files besides
smack-config.xml
2014-03-28 14:46:30 +01:00
Florian Schmaus 2250944ca6 Further improved logging in SmackConfiguration 2014-03-28 14:46:30 +01:00
Florian Schmaus 2619a63c21 Log loaded classes by SmackConfiguration 2014-03-28 14:46:30 +01:00
Florian Schmaus b8a5437b28 Fix all javadoc warnings 2014-03-10 21:58:12 +01:00
Florian Schmaus a3ab886896 Reworked compression-jzlib and compressionHandlers
- There is now no longer the need to use reflection for
compression-jzlib.
- compressionHandlers are a global configuration property and therefore
belong in SmackConfiguration.
2014-03-10 10:20:52 +01:00
Florian Schmaus f3e007bad5 NPE check in SmackConfiguration 2014-03-09 23:43:34 +01:00
Florian Schmaus 54a421e84e Make JUL Loggers final (SMACK-536) 2014-02-26 22:00:27 +01:00
Florian Schmaus 3093333533 Reworked Smack initialization
Move extension relevant configuration options from SmackConfiguration to
the extension. Introduced disabledSmackClasses that can be configured
via a system property or configuration file.
2014-02-23 17:48:07 +01:00
Florian Schmaus 4121ec2c0e Use String(String,String) constructor in SmackConfiguration
String(String, Charset) is not available on all platforms, as it's only
provided by Android on API level 9 or higher.
2014-02-22 14:41:19 +01:00
Florian Schmaus 24b637876f Substitute MXParser with a call to XmlPullParserFactory
This makes Smack more portable, as there are platforms that support the
XmlPullParser interface, but not MXParser (e.g. Android).

Also enable checkstyle check that MXParser is not used.
2014-02-20 13:48:36 +01:00
Florian Schmaus 7bd7b3d24c Improve packet send and result collecting API
Instead of repeating the same pattern, when sending an IQ get/set packet
and collecting the response

PacketFilter filter = new PacketIDFilter(request.getPacketID()),
PacketCollector collector = connection.createPacketCollector(filter);
connection.sendPacket(reg);
IQ result = (IQ)collector.nextResult(SmackConfiguration.getPacketReplyTimeout());
// Stop queuing results
collector.cancel();
if (result == null) {
    throw new XMPPException("No response from server.");
}
else if (result.getType() == IQ.Type.ERROR) {
    throw new XMPPException(result.getError());
}

the API got redesigned, so that the above code block can be replaced
with

Packet result = connection.createPacketCollectorAndSend(request).nextResultOrThrow();
2014-02-18 19:39:47 +01:00
Florian Schmaus 1e57f1c659 Activate checkstyle and add missing license headers
Delete also all "All rights reserved" statements, as they are
unnecessary and conflict with checkstyle's header check. Delete unused
imports.
2014-02-17 20:09:55 +01:00
Florian Schmaus 2ad517b6dd Add initializer tests and move classpath files
The initializer tests verify that every non-optional initializer, this
includes Providers, is loadable.

Creating files under META-INF is not considered best practice. Smack's
configuration and provider files reside now in classpath directory
qualified by Smack's package namespace.
2014-02-15 22:12:12 +01:00
Florian Schmaus 201152ef42 Migrate from Ant to Gradle (SMACK-265) 2014-02-14 18:46:33 +01:00
Renamed from source/org/jivesoftware/smack/SmackConfiguration.java (Browse further)