Commit Graph

40 Commits

Author SHA1 Message Date
Florian Schmaus 64d134052d Enable javadoc checkstyle
and fix violations.
2015-03-29 12:29:32 +02:00
Florian Schmaus 83b84c5bd3 Merge branch '4.1'
Conflicts:
	smack-core/src/main/java/org/jivesoftware/smack/StanzaListener.java
	smack-core/src/main/java/org/jivesoftware/smack/XMPPConnection.java
	smack-core/src/main/java/org/jivesoftware/smack/packet/Stanza.java
	smack-core/src/main/java/org/jivesoftware/smack/util/PacketParserUtils.java
	version.gradle
2015-03-24 17:16:18 +01:00
Florian Schmaus 164b7c6690 Set localNodeVer after currentCapsVersion is set 2015-03-24 12:05:56 +01:00
Florian Schmaus 130a8216d1 EntityCapsManager must not use CapsVersionAndHash.toString()
as it would return Object.toString(). Instead the entity version string
was required. Use getLocalNodeVer() instead.
2015-03-24 11:59:31 +01:00
Florian Schmaus f546d28ad8 Xlint all the things
and fix all warnings.
2015-03-23 09:28:49 +01:00
Florian Schmaus 5e86db4f80 Substitute 'packet' with 'stanza(/packet)' in javadoc 2015-03-21 09:36:28 +01:00
Florian Schmaus 369878b6d9 Merge branch '4.1'
Conflicts:
	version.gradle
2015-03-11 20:51:08 +01:00
Florian Schmaus d389b4db20 Fix NPE in EntityCapsManager
persistentCache may be null.
2015-03-10 13:22:48 +01:00
Florian Schmaus 701aa7d9c4 Merge branch '4.1'
Conflicts:
	smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java
	smack-core/src/main/java/org/jivesoftware/smack/PacketCollector.java
	smack-core/src/main/java/org/jivesoftware/smack/PacketListener.java
	smack-core/src/main/java/org/jivesoftware/smack/XMPPConnection.java
	smack-core/src/main/java/org/jivesoftware/smack/debugger/SmackDebugger.java
	smack-core/src/main/java/org/jivesoftware/smack/packet/Packet.java
	smack-core/src/main/java/org/jivesoftware/smack/util/XmlStringBuilder.java
	smack-core/src/test/java/org/jivesoftware/smack/ThreadedDummyConnection.java
	smack-extensions/src/main/java/org/jivesoftware/smackx/address/provider/MultipleAddressesProvider.java
	smack-extensions/src/main/java/org/jivesoftware/smackx/bytestreams/ibb/DataListener.java
	smack-extensions/src/main/java/org/jivesoftware/smackx/filetransfer/FaultTolerantNegotiator.java
	smack-extensions/src/main/java/org/jivesoftware/smackx/filetransfer/IBBTransferNegotiator.java
	smack-extensions/src/main/java/org/jivesoftware/smackx/filetransfer/Socks5TransferNegotiator.java
	smack-extensions/src/main/java/org/jivesoftware/smackx/filetransfer/StreamNegotiator.java
	smack-extensions/src/main/java/org/jivesoftware/smackx/muc/MultiUserChat.java
	smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/LeafNode.java
	smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/Node.java
	smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/PubSubManager.java
	smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/packet/PubSub.java
	smack-extensions/src/main/java/org/jivesoftware/smackx/vcardtemp/VCardManager.java
	smack-extensions/src/test/java/org/jivesoftware/smackx/receipts/DeliveryReceiptTest.java
	smack-im/src/main/java/org/jivesoftware/smack/chat/ChatManager.java
	smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/JingleSession.java
	smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/provider/JingleProvider.java
	smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/packet/UserID.java
	smack-legacy/src/main/java/org/jivesoftware/smackx/xroster/provider/RosterExchangeProvider.java
	smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java
	version.gradle
2015-03-04 22:42:36 +01:00
Florian Schmaus ed4fa3390f Add XMPPConnection.sendStanza(Stanza)
and deprecate sendPacket().
2015-03-04 21:46:44 +01:00
Florian Schmaus 75ec271c6c Rename PacketListener to StanzaListener
and add the PacketListener as deprecated interface.
2015-03-02 15:49:56 +01:00
Florian Schmaus d4a6d8e653 Rename PacketFilter (and implementing classes) and PacketExtension
to StanzaFilter and ExtensionElement.
2015-02-28 13:49:38 +01:00
Florian Schmaus 5bb4727c57 Use Jid (and subclasses) from jxmpp-jid
Fixes SMACK-634
2015-02-17 16:07:16 +01:00
Florian Schmaus bc61527bd2 Expose InterruptedException
SMACK-632
2015-02-14 14:57:33 +01:00
Florian Schmaus 4698805a34 Rename 'Packet' class to 'Stanza'
Smack still uses the term 'Packet' in some places. This is just the
first step towards using correct XMPP terms in Smack.
2015-02-06 09:34:51 +01:00
Florian Schmaus e380872a41 Add 'resumed' bool ConnectionListener's authenticated()
It's important to know if the stream was resumed. authenticated() is the
ideal callback for Managers to reset their state (e.g. cached values of
the connection state). But if the stream was resumed, the cached values
don't have to be reset.
2015-01-07 21:11:09 +01:00
Florian Schmaus 82eb9b18dd Add and use AbstractConnectionClosedListener 2015-01-07 20:11:00 +01:00
Florian Schmaus 717090d272 Rework incoming packet listeners and Roster
Differentiate between asynchronous and synchronous ones. Asynchronous
are the ones where the invocation order may not be the same as the order
in which the stanzas arrived.

Since it's no longer guaranteed that when a unit test calls

processPacket(stanza)

the stanza will be completely processed when the call returns, it was
necessary to extend the unit tests (mostly Roster and ChatManager) with
a packet listener that waits for his invocation. Since we now also use
LinkedHashMaps as Map for the packet listeners (SMACK-531, SMACK-424),
adding a packet listeners as last also means that it will be called as
last. We exploit this behavior change now in the unit tests.

Rename 'recvListeners' to 'syncRecvListeners' in AbstractXMPPConnection.

Rename 'rosterInitialized' to 'loaded' in Roster.

Add Roster.isLoaded().

Reset 'loaded' to false in
Roster.setOfflinePresencesAndResetLoaded() (was setOfflinePresences()).

Fixes SMACK-583, SMACK-532, SMACK-424
2015-01-07 14:35:23 +01:00
Florian Schmaus 56bf54eab5 Don't use synchonrizedMap() for INSTANCES
in Managers. The getInstanceFor() method is already synchronized.
2014-12-27 20:55:30 +01:00
Florian Schmaus b3b42f3a9b Fix nodeVer generation for local caps information
This was broken with 5dd97a363c, where
currentCapsVersion was changed from String to CapsVersionAndHash.
2014-12-10 15:42:31 +01:00
Florian Schmaus 4c2d5d797a Ensure that the hash value is put in lowercase on the wire 2014-12-10 14:19:01 +01:00
Florian Schmaus 5dd97a363c Introduce CapsVersionAndHash
Entity Capability versions are useless without the information which
hash algorithm was used to calculate those. Right now, only 'sha-1' is
used, but this may change in the feature. This commit makes the first
steps preparing for such a feature.

Also fixes a minor bug:

-        CAPS_CACHE.put(currentCapsVersion, discoverInfo);

currentCapsVersion is not a valid key for the cache, as it does cache
"node + '#' + ver" to disco infos.
2014-12-03 13:01:13 +01:00
Florian Schmaus 3cbd845df2 s/intercepter/interceptor/ in comment of EntityCapsManager 2014-12-02 18:16:34 +01:00
Florian Schmaus cc09192095 Smack 4.0.6
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQF8BAABCgBmBQJUci2fXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
 ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQxMzU3QjAxODY1QjI1MDNDMTg0NTNEMjA4
 Q0FDMkE5Njc4NTQ4RTM1AAoJEIysKpZ4VI415IIH/j1eCvLIjNqNP6ytXdgomYY+
 j2i5KRHMv69La1JqtdmAeTeZfD13549s/66I5VUfegEfaADGUPr1NGrQKlb8lJBe
 YSqthMaQUybLBuCL9Lwg/3jE6s27GixRjW/Wip4ntac1wS2R3qD18lAxYIivsGJh
 gvyGHGoXvdct6teu9X0RtmyE/EOBfV63y1gVJG07Jv5/AJ2wCh9dIOD4jFuqvkoA
 cz2OfVJOIFletBV2psLxc0VVeqU9Lpba5TZuW1ZylY61z+X2rpt9BwCgBD35jTF9
 ztP2ytQY80+vZO6uP+Tl75QxdQd/e0O9oGnYbmMp1gfYQjgETaHUDxAL2uw4XNo=
 =7UY+
 -----END PGP SIGNATURE-----

Merge tag '4.0.6'

Smack 4.0.6

Conflicts:
	smack-core/src/main/java/org/jivesoftware/smack/util/DNSUtil.java
	smack-extensions/src/main/java/org/jivesoftware/smackx/caps/EntityCapsManager.java
	version.gradle
2014-11-23 20:05:44 +01:00
Florian Schmaus a848437284 Make digest() in EntityCapsManager synchronized
Fixes SMACK-617
2014-11-14 21:02:18 +01:00
Florian Schmaus fadef7d1bf Remove ServiceDiscoveryManager.getFeaturesList()
The method was redundant, getFeatures() did already return a copy of the
features. There is also no need to make it an unmodifiable List.
2014-11-01 13:16:22 +01:00
Florian Schmaus ce203e76b5 Use AbstractNodeInformationProvider where possible 2014-10-13 22:35:45 +02:00
Florian Schmaus 55d7c57a4f Use PacketTypeFilter.PRESENCE in EntityCapsManager 2014-10-12 19:21:49 +02:00
Florian Schmaus 63d52f6eaa Replace PacketInterceptor with PacketListener
both serve the same purpose: As callback for Packets. There is no need
to have both, so remace PacketInterceptor and let PacketListener take
its place. Some classes like ChatStateManager can now use
MessageListener as interceptor callback, which is more convenient.
2014-10-12 19:19:44 +02:00
Florian Schmaus 58e430af42 PacketExtension.from(Packet), deprecate getFrom()
add 'from(Packet)' to DataForm
2014-09-16 22:22:25 +02:00
Florian Schmaus f2718c2d76 Remove smack.util.Cache
and use the Cache from jxmpp-util-cache instead.
2014-09-13 00:38:11 +02:00
Florian Schmaus 46a4402a69 Add StreamFeatureProvider
so that AccountManager and the CapsExtension can be moved to
smack-extensions, where they belong.
2014-09-11 23:58:07 +02:00
Florian Schmaus fc51f3df48 Add support for XEP-0198: Stream Management
- De-duplicate code by moving it into AbstractXMPPConnection
- Introduce TopLevelStreamElement as superclass for all XMPP stream elements.
- Add SynchronizationPoint, ParserUtils
- Add ParserUtils

Fixes SMACK-333 and SMACK-521
2014-09-11 09:49:16 +02:00
Florian Schmaus 5d4aa76d19 Create smack.util.stringencoder for Base64, Base32,…
Use Android's Base64 implementation when on Android, otherwise, when on
Java7, use the existing one.
2014-09-04 11:07:55 +02:00
Florian Schmaus 94a16ba41e Merge branch '4.0'
Conflicts:
	build.gradle
	documentation/connections.html
	documentation/gettingstarted.html
	smack-core/src/main/java/org/jivesoftware/smack/SmackException.java
	smack-core/src/test/java/org/jivesoftware/smack/parsing/ParsingExceptionTest.java
	smack-core/src/test/java/org/jivesoftware/smack/test/util/TestUtils.java
	smack-core/src/test/java/org/jivesoftware/smack/util/PacketParserUtilsTest.java
	smack-extensions/src/main/java/org/jivesoftware/smackx/caps/cache/SimpleDirectoryPersistentCache.java
	smack-extensions/src/main/java/org/jivesoftware/smackx/ping/PingManager.java
	smack-tcp/src/main/java/org/jivesoftware/smack/tcp/PacketReader.java
2014-07-05 14:37:22 +02:00
Florian Schmaus 26b5bc0212 Properly escape Bookmarks and FormField XML
by using XmlStringBuilder. Fixes SMACK-577

Also extend LazyStringBuilder with a cache. And extend XmlStringBuilder
with some more convenience methods.

Move the ELEMENT and NAMESPACE definition from Form to DataForm, where
it belongs.
2014-06-19 16:52:19 +02:00
Júlio Cesar Bueno Cotta 9be0c480e3 Change IQ.Type to enum 2014-06-06 21:10:13 -03:00
Florian Schmaus beecb8a675 Make XMPPConnection an interface
create AbstractXMPPConnection.
2014-05-28 08:18:41 +02:00
Florian Schmaus 6dd180e9d3 Improve Entity Capabilities code
Most importantly, rename reload() method of persistent cache to
"DiscoverInfo lookup(String nodeVer)" and lazily load the data from the
persistent cache to the memory cache.
2014-05-25 17:56:32 +02:00
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
Renamed from extensions/src/main/java/org/jivesoftware/smackx/caps/EntityCapsManager.java (Browse further)