1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-14 16:22:07 +01:00
Commit graph

692 commits

Author SHA1 Message Date
Florian Schmaus
989dbb14e8
Merge pull request #296 from MarcelHeckel/PingManager_ConnectionOkOnAnyPacket
PingManager: con. assumed ok for any packed within the ping interval
2019-03-20 20:00:54 +01:00
adiaholic
d6e25730d0 Saving an instance of ServiceDiscoveryManager in MultiUserChatManager.
Previously, the costly method 'ServiceDiscoveryManager.getInstance()'
was called at multiple instances inside MultiUserChatManager.
In this commit I wish to replace this call by saving a private final
instance of 'ServiceDiscoveryManager' which will is an attempt at
solving SMACK-836.
2019-03-18 13:10:20 +05:30
Florian Schmaus
daab6039a1 Smack 4.3.3
-----BEGIN PGP SIGNATURE-----
 
 iQGTBAABCgB9FiEEl3UFnzoh3OFr5PuuIjmn6PWFIFIFAlyKV9tfFIAAAAAALgAo
 aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDk3
 NzUwNTlGM0EyMURDRTE2QkU0RkJBRTIyMzlBN0U4RjU4NTIwNTIACgkQIjmn6PWF
 IFL4vQf/Qfg3VzNEnmk0+KjOtuvfAbhMfzE92gfo15vE0PPEIe9VA0Pzkvqhva4k
 Efw7BhD2zx8hWvo0d5FfkdII89hSYnOCiSmhiX1Ln9q/gUqFW0TDAKpsMfAl7jAK
 Fap8M7uUStP9T6fF/gq01djYCYoWA/4v1lGKv4J4b9gWCqzGIF2sK0M7of7VERnr
 pEXJSUM228rk6EYjVmX/9Ujo1Y+xaNMFFZZSbKYrirAqjP540v0OPBCRQyB8qFaI
 NTcNJ+qESe6Q80mw5V+y/kD6kX0LERSDB+pigzOOOlmfMtD1uADR84tAynuTKNAU
 7/5K/YSQxceRY6RTgD17Al5lHIH5nw==
 =ToR+
 -----END PGP SIGNATURE-----

Merge tag '4.3.3'

Smack 4.3.3
2019-03-14 18:23:33 +01:00
Heckel
3d3d89612f PingManager: Assume server ping successful if stanzas where received
We assume that the connection is good even if there was no ping
result but a stanzas within the ping interval.

In some case we have produced so much load, that the ping result
was not delivered in time because so many other packets were
delivered before.
2019-03-14 12:42:46 +01:00
Florian Schmaus
7f0932a481 Reset the MUC self-presence collector on presence stanzas on join
To prevent timeouts when joining very large MUCs we now reset the
self-presence collector's timeout for every other (occupant) presence
we receive.

Fixes SMACK-859.
2019-03-04 23:01:52 +01:00
Florian Schmaus
825a5836eb Merge branch '4.3' 2019-02-17 22:28:01 +01:00
Florian Schmaus
e9b514548b Filter error messages in DeliveryReceiptManager 2019-02-17 22:27:38 +01:00
Florian Schmaus
85f7e1d39c Remove deprecated methods scheduled for removal in Smack 4.4 2019-02-16 17:17:25 +01:00
Florian Schmaus
8df69bd3ce Use XmlEnvironment in parsing/provider subsystem 2019-02-15 23:21:30 +01:00
Florian Schmaus
b3801b984a Use PacketParserUtils in OpenIQProviderTest 2019-02-15 23:16:11 +01:00
Florian Schmaus
394f3d133a Make SmackException abstract 2019-02-10 21:53:31 +01:00
Florian Schmaus
7fce6b5a98 Introduce SmackMessageException 2019-02-10 21:50:39 +01:00
Florian Schmaus
7dee3b88a2 Introduce SmackParsingException 2019-02-10 19:01:47 +01:00
Florian Schmaus
083dac8b83 Rework exceptions in the parsing / provider subsystem 2019-02-05 13:18:03 +01:00
Florian Schmaus
fee3ed81ca Introduce XmlEnvironment 2019-02-05 13:18:03 +01:00
Florian Schmaus
658fd08d20 Use try-with-resources where possible
and make StanzaCollector implement AutoCloseable.
2019-02-05 13:18:03 +01:00
Florian Schmaus
e98d42790a SmackReactor/NIO, Java8/Android19, Pretty print XML, FSM connections
This commit adds
- SmackReactor / NIO
- a framework for finite state machine connections
- support for Java 8
- pretty printed XML debug output

It also
- reworks the integration test framework
- raises the minimum Android API level to 19
- introduces XmppNioTcpConnection

Furthermore fixes SMACK-801 (at least partly). Java 8 language
features are available, but not all runtime library methods. For that
we would need to raise the Android API level to 24 or higher.
2019-02-05 13:18:03 +01:00
Florian Schmaus
ee8728479d Merge branch '4.3' 2018-12-27 14:43:31 +01:00
Florian Schmaus
1a4ad7b8b5 Mark Local SOCKS5 Proxy thread as daemon thread
Fixes SMACK-849.
2018-12-27 14:42:48 +01:00
Florian Schmaus
e4c31541e0 Make MultiUserChat.leave() behave as leaveSync()
and mark leaveSync() as deprecated.

Fixes SMACK-848.
2018-12-26 21:50:36 +01:00
Florian Schmaus
a9de8e2f76 Merge branch '4.3' 2018-12-26 21:40:10 +01:00
Florian Schmaus
4b21f003af Add MultiUserChat.leaveSync()
Fixes SMACK-848.
2018-12-26 21:39:25 +01:00
Florian Schmaus
62a0c6f26e Merge branch '4.3' 2018-11-29 22:39:55 +01:00
Florian Schmaus
fa7297019d Add checkstyle rule for "Boolean.valueOf()" usages 2018-11-29 22:38:11 +01:00
Georg Lukas
b8bd10b056 RoomInfo: use proper boolean parser for muc#roominfo_subjectmod
XML allows both false/true and 0/1 syntax for booleans.

Signed-off-by: Georg Lukas <georg@op-co.de>
2018-11-28 11:11:52 +01:00
Georg Lukas
8b88f9cb20 Bookmarks: use proper boolean parser for autojoin
Some clients (read: Gajim) store boolean values as `0` and `1` instead
of `false` and `true`, which is legal for the XML boolean type.

Signed-off-by: Georg Lukas <georg@op-co.de>
2018-11-28 11:11:52 +01:00
cc1bee4659
SMACK-828: Add support for XEP-0107: User Mood 2018-11-11 16:13:41 +01:00
Florian Schmaus
b7ea226c56 Bump "Error Prone" to 2.3.2
and gradle-errorprone-plugin to 0.6.
2018-10-31 16:06:31 +01:00
Florian Schmaus
2ee621ed10 Factor NickProvider in extra file and fill under correct package 2018-10-21 09:31:15 +02:00
Florian Schmaus
382057f520 Make Nick immutable 2018-10-21 09:01:54 +02:00
Florian Schmaus
2f1f0b6c1a Clear comments in Nick 2018-10-21 08:58:33 +02:00
Florian Schmaus
c053f5a41b Escape nickname in Nick.toXML() 2018-10-21 08:58:16 +02:00
Florian Schmaus
ab120691cb Smack 4.3.1
-----BEGIN PGP SIGNATURE-----
 
 iQGTBAABCgB9FiEEl3UFnzoh3OFr5PuuIjmn6PWFIFIFAlvDIBdfFIAAAAAALgAo
 aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDk3
 NzUwNTlGM0EyMURDRTE2QkU0RkJBRTIyMzlBN0U4RjU4NTIwNTIACgkQIjmn6PWF
 IFKObAgApvEwstvSXhgzlrA46DM6fXezbPEnO1rh8rCPJEAsmfBSnyINSuuhelzw
 zN8L7GAU0jDeuDivxA12vQx5QB8wuCHKgc5pXDKNRi9eUdsyDUMKswcbMMAJWDvq
 I3bm7TOC1D9ZWmfhGmqfulrsVD1Q0wh+P2A1/CWVR5ZZUB5S4fESFZUrnCfJmeXe
 f+INXUiui3otAF6nPxKm782rSfHWvA32i4Obnagh3oPX/c9R7Ftb78Wukrsbaqfg
 +a5iTlBJXLG75/Yozq+JqmWlUvEKv7le0vkF5fF+oc76H4p1U1wqQyIMei/Pwaer
 H/SyMqLPzCiwpUHiunpWD13e5kkeLw==
 =47on
 -----END PGP SIGNATURE-----

Merge tag '4.3.1'

Smack 4.3.1
2018-10-14 14:31:31 +02:00
Florian Schmaus
ec982f65e2 Fix IndexOutOfBoundsException in FormField.getFirstValue()
Fixes SMACK-838.
2018-10-14 12:07:51 +02:00
Florian Schmaus
1aa35bc957 Merge branch '4.3' of github.com:Flowdalic/Smack into 4.3 2018-09-12 20:02:16 +02:00
Florian Schmaus
87fac888c6 Improve MultiUserChat's API to query hosted rooms
Return a Map instead of a List. This makes it possible to check for
the existence of MUC by looking up the MUC's address in the Map's key
set.
2018-09-12 19:56:46 +02:00
Florian Schmaus
271ac7ee7a Use PossibleFromTypeFilter for MultiUserChat's presence listener 2018-09-10 21:05:47 +02:00
Florian Schmaus
77baaa99bc Do not warn on presence from bare MUC JID in MultiUserChat
as such presence messages became a thing in XMPP (e.g. for XEP-0153
avatars for MUC).
2018-09-10 21:00:49 +02:00
Florian Schmaus
0e847f34f3 Remove unused method in pubsub.Subscription 2018-08-21 12:51:52 +02:00
Florian Schmaus
7374caefef Make StringEncoder generic 2018-08-21 11:09:26 +02:00
Florian Schmaus
27164f4c06 Do not use a generic return parameter in PubSubManager.getNode() 2018-08-16 17:23:15 +02:00
Florian Schmaus
528e170b99 Use pepPubSubManager in PepManager.publish() 2018-08-15 20:16:33 +02:00
Florian Schmaus
4d4f92ba86 Rename PEP to Pep 2018-08-15 20:15:57 +02:00
Florian Schmaus
4b3f757ed9 Add a PEP PubSubManager to PEPManager 2018-08-15 20:13:40 +02:00
Florian Schmaus
5569782113 Fix javadoc in PEPManager 2018-08-15 17:58:53 +02:00
Florian Schmaus
a1d4a91fa0 Make PubSubManager.deleteNode(String) "node did not exists" aware 2018-08-15 17:48:54 +02:00
Florian Schmaus
a00aa726fe Introduce CloseableUtil 2018-08-15 17:25:22 +02:00
Florian Schmaus
50385be964 Bump jxmpp to 0.7.0-alpha1 2018-08-02 14:45:26 +02:00
74bebc13e6
requireNotNullOrEmpty -> requireNotNullNorEmpty 2018-07-17 15:10:39 +02:00
Florian Schmaus
ce4f3352a2 Merge branch '4.3' 2018-06-23 17:18:17 +02:00
Florian Schmaus
23bb5c5625 Add XMPPErrorException.getStanzaError()
Also deprecate getXMPPError and let StanzaError implement
ExtensionElement.
2018-06-20 22:17:11 +02:00
Florian Schmaus
8841c4aed2 Remove deprecated method sin SDM and AdHocCommandManager
These methods are related to functionality which is no longer existend
in XEP-0030.
2018-06-14 09:59:46 +02:00
Florian Schmaus
84ef4047a7 Remove depreacted methods in MultiUserChat 2018-06-14 09:58:52 +02:00
Florian Schmaus
9e865fe6ab Merge remote-tracking branch 'ignite/4.3' into 4.3 2018-06-12 13:41:43 +02:00
Florian Schmaus
6ba9218c77 Introduce myRoomJid EntityFullJid in MultiUserChat 2018-06-12 12:16:56 +02:00
Guus der Kinderen
03a267a925 fix: Prevent attempt to construct invalid address
When no join was properly registered, a nickname will not be defined.
In that case, attempting to construct the from address for the 'leave'
presence stanza will result in:

java.lang.IllegalArgumentException: The Resourcepart must not be null

This commit prevents that, by verifying that the nickname is non-null,
before sending that stanza.
2018-06-12 10:09:55 +02:00
Florian Schmaus
5ae164f670 Add Forwarded.extractMessagesFrom(Collection<Forwarded>) 2018-06-06 08:39:09 +02:00
Florian Schmaus
8aa7029b38 Add DataForm.addFields() 2018-06-03 21:19:04 +02:00
Florian Schmaus
d26baeb66f Add Date API methods to FormField values 2018-06-03 17:29:09 +02:00
Florian Schmaus
298bcc8097 Improve FormField.resetValues()
by using clear() instead of removeAll().
2018-06-03 17:29:09 +02:00
Florian Schmaus
2adf8a79af Add CommandsProviderTest 2018-06-03 17:01:19 +02:00
Florian Schmaus
ccf2b8bcf8 Add MultiUserChat.getXmppConnection() 2018-05-31 18:37:08 +02:00
Boris Grozev
fd5e86ce5a fix: Cleans the multiUserChats map. 2018-05-21 14:54:23 -05:00
Florian Schmaus
98a029e9c7 Set name of local SOCKS5 proxy thread 2018-05-13 19:37:41 +02:00
Florian Schmaus
fd97f5ba0b Use a CopyOnWriteArraySet for joinedRooms
Since it is accessed concurrently. And also may cause a
ConcurrentModificationException when the MultiUserChatManager tries to
re-join the joined rooms.

Fixes SMACK-819.
2018-05-10 20:30:24 +02:00
Florian Schmaus
72de6540b2 Add DiscoInfoLookupShortcutMechanism and EntityCapabilitiesChangedListener
to allow for plugable XEP-0115 like mechanisms. For example XEP-0390.
2018-05-10 20:30:23 +02:00
Florian Schmaus
c94962c763 Add toString() to Disco Feature and Identity 2018-05-10 15:25:20 +02:00
Florian Schmaus
e8923b9d16 Enable trailing whitespace checkstyle check
for all source code regions, including javadoc.
2018-05-09 23:26:39 +02:00
Florian Schmaus
e5d93e58a1 Bump PowerMock to 1.7.3
And also drop the powermock-classloading-xstream dependency as it is
currently not used.
2018-05-09 20:16:05 +02:00
Florian Schmaus
a9e45475ab Treat <body/> just like all other extension elements in Message
This turned out to be a rather large change.
2018-05-09 17:13:09 +02:00
Florian Schmaus
cb9a11b74e Fix Forwarded.toXml(String): Set the correct enclosing XML namespace 2018-05-09 17:13:09 +02:00
Florian Schmaus
779ebd5d69
Merge pull request #234 from vanitasvitae/fixDeliveryReceipts
Make receipts id optional (SMACK-815)
2018-05-06 22:00:47 +02:00
95534da53f
Make receipts id optional
(SMACK-815)

Remove @author and change javadoc
2018-04-28 13:24:46 +02:00
Florian Schmaus
5ab2903c32 Change Element.toXml() to toXml(String enclosingNamespace) 2018-04-27 10:05:25 +02:00
Florian Schmaus
6c4a02691e Make PubSub's SimplePayload infer the XML Element name and namespace
Fixes SMACK-816.
2018-04-23 22:00:12 +02:00
Florian Schmaus
cc0022c919 Globally s;Stanza(/Packet);Stanza; and more 'packet' → 'stanza' 2018-04-23 21:10:22 +02:00
Florian Schmaus
2065a7ed01 Add findServicesDiscoverInfo() with service argument
to ServiceDiscoveryManager.
2018-04-23 20:41:33 +02:00
Florian Schmaus
31244ae982 Make PubSub elements namespace aware
Also fixes SMACK-814.
2018-04-23 20:36:41 +02:00
Florian Schmaus
acc64ffc2d Remove unnecessary argument from createMockedConnection()
The server address can be infered from the user JID.
2018-04-23 17:02:28 +02:00
Florian Schmaus
2050845289 Fix Protocol code examples in Javadoc 2018-04-23 17:02:28 +02:00
Florian Schmaus
73168bff69 Use XmlUtil for XML pretty printing in Protocol 2018-04-23 17:02:28 +02:00
Florian Schmaus
4fb34a6952 Add MultiUserChatManager.getMucServiceDomains()
and deprecate getXMPPServiceDomains().
2018-04-23 17:02:28 +02:00
Florian Schmaus
f69cd55970
Merge pull request #232 from TimothyPitt/PubSub_NotificationType
Pub sub notification type
2018-04-16 18:22:08 +02:00
Timothy Pitt
d5aaf8fdab Notification type for pubsub node config 2018-04-16 16:03:02 +02:00
Florian Schmaus
74f14484e6 Smack 4.2.4
-----BEGIN PGP SIGNATURE-----
 
 iQGTBAABCgB9FiEEl3UFnzoh3OFr5PuuIjmn6PWFIFIFAlrTPy5fFIAAAAAALgAo
 aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDk3
 NzUwNTlGM0EyMURDRTE2QkU0RkJBRTIyMzlBN0U4RjU4NTIwNTIACgkQIjmn6PWF
 IFI5aAf/Rb6Y+hqxiHRbsmww74rt7HfgQnOjOjz3bPhgbVH2emzBHzxsU2pBBY87
 iTfCXjXA3qQ9FzluBchLrd9EciDEXq1A/ZblYnR+kch1DK7wvVipTPWIzOHt6ahD
 q7vfS9EmmFBCRjNM4tW8zwaajWWeJAWimXoZFxuy/n+2FORnx0x5NrnIHwYvyUtf
 nY432BOiCg7l6J9sgfcoYDgP0Ot4SkdfUIgGOYonv0lzKW8HkU/OZZwEMbFhlCHU
 s0inbU5ldDDP7xXIinDqHVSKpRlSIkaOJ0zbAQLjFz8h2fCnqDGhpnNbun8Xb7l2
 agsATloOl91tlUV5D+qRWjzkx7pDxA==
 =YqLS
 -----END PGP SIGNATURE-----

Merge tag '4.2.4'

Smack 4.2.4
2018-04-15 14:48:22 +02:00
Florian Schmaus
5f58529c3a Switch argument of VCard.setJabberId() to CharSequence
instead of String.
2018-04-13 10:09:14 +02:00
2614c0d5c1
Add support for XEP-0319: Last User Interaction (SMACK-636) 2018-04-09 20:59:39 +02:00
Timothy Pitt
832c0a92aa Added pubsub Node.modifySubscriptionsAsOwner with test 2018-04-09 18:03:53 +02:00
Florian Schmaus
476fdf99a1 Inroduce AsyncButOrdered 2018-04-08 21:21:50 +02:00
Florian Schmaus
2efec89050 Rename XMPPError to StanzaError
Fixes SMACK-769.
2018-04-07 22:59:25 +02:00
Florian Schmaus
0e15a903d9 Do not silently swallow exceptions in ChatStateManager 2018-04-06 19:38:12 +02:00
Florian Schmaus
19a445ea02 Remove unnecessary check in ChatStateManager 2018-04-06 19:38:12 +02:00
Florian Schmaus
9d53363413 Synchronize ChatStateManager's chatStateListeners 2018-04-06 19:38:12 +02:00
Florian Schmaus
1d88c857b5 Change FormField value(s) type from String to CharSequence 2018-04-06 13:24:54 +02:00
Florian Schmaus
9b5dafe541 Enable LeftCurly checkstyle check 2018-04-06 10:25:06 +02:00
Florian Schmaus
6a42d5baff Rework FileUtils 2018-04-06 10:25:06 +02:00
Fernando Ramirez
632c172f6d Add pubsub publishing and altaccuracy parameter to geoloc 2018-04-04 15:04:42 +02:00
Florian Schmaus
ad87243060 Globally 's;stanza(/packet);stanza;' 2018-03-31 14:17:30 +02:00
Florian Schmaus
a9ca1a0989 Enable ModifierOrder checkstyle check
Fixes SMACK-812
2018-03-29 12:35:11 +02:00
Florian Schmaus
bd08f11c4a Add DataValidationTest.testNamespacePrefix() 2018-03-28 19:37:26 +02:00