Commit Graph

168 Commits

Author SHA1 Message Date
Florian Schmaus a9ca1a0989 Enable ModifierOrder checkstyle check
Fixes SMACK-812
2018-03-29 12:35:11 +02:00
Florian Schmaus 193688e553 Merge branch '4.2' 2018-03-28 12:51:28 +02:00
Florian Schmaus 5b9254aff5
Merge pull request #209 from fuentesj11/rename-deprecate-xmppconnection-methods
Rename and deprecate XMPPConnection methods
2018-03-28 12:11:32 +02:00
Jesus Fuentes a70063dc89 Rename and deprecate XMPPConnection methods
Rename and deprecate XMPPConnections methods as described in SMACK-802
2018-03-22 15:40:40 -05:00
Florian Schmaus 7c9060c32b Merge branch '4.2' 2018-02-27 08:09:34 +01:00
Florian Schmaus 4f88f23f33 Make scheduled executor service static 2018-02-26 10:23:02 +01:00
Florian Schmaus cd05d5f5d8 Call schedule() instead of directly invoking the scheduled executor
in AbstractXMPPConnection.
2018-02-25 11:29:39 +01:00
Florian Schmaus c90607d7db Call schedule() instead of directly invoking the scheduled executor
in AbstractXMPPConnection.
2018-02-23 18:50:02 +01:00
Florian Schmaus 3bdeca44f2 Merge branch '4.2' 2018-02-23 18:35:34 +01:00
Florian Schmaus 72a2014572 Set core-pool size of single-threaded executor to zero
in AbstractXMPPConnection.
2018-02-23 18:22:53 +01:00
Florian Schmaus a4ab6245f6 Make cached executor service static 2018-02-23 17:04:51 +01:00
Florian Schmaus abdfe73006 Remove executorService from AbstractXMPPConnection
Reduces thread count per connection by one.
2018-02-23 16:48:15 +01:00
Florian Schmaus 793d3c47ad Move TLS and SASL sync points into subclasses
In preperation of subclasses with different connection approaches.
2018-02-23 10:37:17 +01:00
Florian Schmaus 5e25491877 Do not send unavailable on disconnect() when not authenticated 2018-02-23 10:37:12 +01:00
Florian Schmaus 0eeab74990 Merge branch '4.2' 2017-12-25 11:40:45 +01:00
Paul Schaub 52398b535f
Fix javadoc issues in some packages 2017-12-23 20:21:19 +01:00
Paul Schaub 2f2c2f8663 Fix minor codestyle issues 2017-12-17 11:19:41 +01:00
Florian Schmaus 76a6b9f2a1 Smack 4.2.2
-----BEGIN PGP SIGNATURE-----
 
 iQGTBAABCgB9FiEEl3UFnzoh3OFr5PuuIjmn6PWFIFIFAloZnf5fFIAAAAAALgAo
 aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDk3
 NzUwNTlGM0EyMURDRTE2QkU0RkJBRTIyMzlBN0U4RjU4NTIwNTIACgkQIjmn6PWF
 IFLcIQgAsTLRI3sWIZDPRuI5YaU/y6beqqzMp5cQgk/9+9DHGBoziLEU1spkvBs2
 Yvlwu3NtHSJsI+ibzYLEFRnzEwuW07vXw7R5J+kRSZrsE40z1HCQRwUIXDkPgghe
 MuL6vT6OV+kLqKb33YLSBuT2fj2pzVE6mRmMsnFekay/weEqOGUZaY9Hd5lJ31/9
 33fQC0FQfKULQ5t7PbdfX4dDDNWn0n6v+KjvjaskHI0oA+vqPWxPkj8gNXWW8b72
 tVV4h5uXQ0ziK3oED79+GH+DSiET9N2PmsZ7woXiFy5H8KbcQDVe5Pazf+Iq2VQ+
 Vi6Vxikr6Ak+v2Xkt+e3x9E6mZDI1w==
 =CVqq
 -----END PGP SIGNATURE-----

Merge tag '4.2.2'

Smack 4.2.2
2017-11-25 18:45:32 +01:00
Florian Schmaus 2edbc64957 Refactor reconnection callbacks into an extra class
Fixes SMACK-775
2017-11-25 16:30:18 +01:00
Florian Schmaus 81002c4fbd Merge branch '4.2' 2017-11-22 08:37:47 +01:00
Florian Schmaus 65b4f506dc Add SubscribeAnswer.ApproveAndAlsoRequestIfRequired 2017-11-06 22:41:28 +01:00
Florian Schmaus 8020fc1416 Make IQRequestHandler the only option to handle IQ requests
Previously StanzaListeners and Collectors where able to receive IQ of
type 'get' or 'set' (i.e., IQ requests) when no IQRequestHandler was
registered. By moving the 'return' statement one level down, even
listeners/collectors won't receive them.
2017-08-16 21:06:23 +02:00
Florian Schmaus ba323b51f9 Remove API parts scheduled to be removed in Smack 4.3 2017-08-16 14:31:46 +02:00
Florian Schmaus 6203d163c4 Deprecate old async API 2017-08-16 13:46:42 +02:00
Florian Schmaus 43abd52d76 Smack 4.2.1
-----BEGIN PGP SIGNATURE-----
 
 iQGTBAABCgB9FiEEl3UFnzoh3OFr5PuuIjmn6PWFIFIFAlmR75tfFIAAAAAALgAo
 aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDk3
 NzUwNTlGM0EyMURDRTE2QkU0RkJBRTIyMzlBN0U4RjU4NTIwNTIACgkQIjmn6PWF
 IFLeXggAjdgj7YVUe22NtamnROBj1c3PaWwgSY0gEjcyDPsOz5qeqNUdQLHbmt2j
 XQQpYZWKg1/1uoQHlsixaFKbGVctKRk72aNEodRfd1osta11WTOwZKEb8nI411Tt
 7M0Fhf430WZY6nioZiZIorsmid57fftJ2EMPlmjEDp2FD0AVGAXkEhCneGaPtt9Q
 hbWbepIy9tApeIH+QgmFLBmPLnFCaSg+X6NUden3Z21bUz5vH8pmcbeUVfsNB7kW
 nkkDuNwKHPFLgjuhcq7D+KAKRwNU7n8WEuHseRzM7bMCEB+S/rZok5KPXe/tV4v+
 YZKN2e+2yh4j5l4FT/fCzELfWcvrgA==
 =MV3G
 -----END PGP SIGNATURE-----

Merge tag '4.2.1'

Smack 4.2.1
2017-08-14 21:01:36 +02:00
Florian Schmaus f4391c07d7 Rework SmackFuture and add async API based on it 2017-08-12 17:35:45 +02:00
Florian Schmaus 0602ae064a Remove deprecated methods from XMPPConnection 2017-08-12 13:36:47 +02:00
Florian Schmaus b8ee8d808f Rework Smack debugger.
Also fixes SMACK-728.
2017-07-28 12:01:11 +02:00
Florian Schmaus 2b11074950 Merge branch '4.2' 2017-06-17 15:55:38 +02:00
Florian Schmaus 08e897113d Add CustomImportOrder checkstyle rule
And matching ImportOrder settings for Eclipse in
resources/eclipse/smack.importorder
2017-06-14 17:12:43 +02:00
Florian Schmaus 7a5f9e6a03 Merge branch '4.2' 2017-05-25 11:25:36 +02:00
Florian Schmaus ce1cddc722 More checkstyle whitespace related checks 2017-05-24 14:42:38 +02:00
Florian Schmaus dcf7406fa4 Add UnknownIqRequestReplyMode 2017-05-16 15:53:03 +02:00
Florian Schmaus c81f28a3a2 Update Error Prone to 2.0.18
and update errorprone-plugin to 0.0.9.
2017-03-07 11:00:47 +01:00
Florian Schmaus 4c646436a5 Bump "Error Prone" to 2.0.15
and fix a few things :)
2017-02-11 16:16:41 +01:00
Florian Schmaus 872b254db5 sendStanzaWithResponseCallback: Ensure exactly one callback is called 2017-01-30 21:01:56 +01:00
Florian Schmaus b142060f9e sendStanzaWithResponseCallback(): remove listener right away
I'm not sure why i've put the removeAsyncStanzaListener() call into
the finally block. If callback.processStanza(Stanza) takes a long
time (or even blocks), then it would appear to the "no response"
handling Runnable as if there was no response, when in fact there was
one.
2017-01-30 17:09:30 +01:00
Florian Schmaus 7c46f58c80 Rename "PacketReplyTimeout" → "ReplyTimeout" 2017-01-12 20:57:19 +01:00
Florian Schmaus b0fef6ffcb Ensure that populateHostAddressees() doesn't return a list with 'null'
Thanks to Grigory Fedorov for reporting this.
2017-01-09 19:36:21 +01:00
Florian Schmaus bfc14227ca Propagate stream errors on connect/login to the caller
Before this, if there was a stream error response by the server to our
stream open, that error response would only be handled in the reader
thread, and the user would get a message like:

"org.jivesoftware.smack.SmackException$NoResponseException: No
response received within reply timeout. Timeout was
5000ms (~5s). While waiting for SASL mechanisms stream feature from
server"

while the server may actually sent something like

<stream:stream
  xmlns='jabber:client'
  xmlns:stream='http://etherx.jabber.org/streams'
  id='6785787028201586334'
  from='jabbim.com'
  version='1.0'
  xml:lang='en'>
  <stream:error>
    <policy-violation xmlns='urn:ietf:params:xml:ns:xmpp-streams'>
	</policy-violation>
	<text xml:lang='en' xmlns='urn:ietf:params:xml:ns:xmpp-streams'>
	  Too many (2) failed authentications from this IP
      address (1xx.66.xx.xxx). The address will be unblocked at 04:24:00
      06.01.2017 UTC
    </text>
  </stream:error>
</stream:stream>

It was necessary to change saslFeatureReceived from SmackException to
XMPPException in order to return the StreamErrorException at this sync
point. But this change in return required the introduction of a
tlsHandled sync point for SmackException (which just acts as a wrapper
for the various exception types that could occurn when establishing
TLS). The tlsHandled sync point is marked successful even if no TLS
was established in case none was required and/or if not supported by
the server.
2017-01-07 10:38:41 +01:00
Florian Schmaus 90a5e289f8 s/processPacket/processStanza/ s/PacketCollector/StanzaCollector/ 2017-01-03 11:35:04 +01:00
Florian Schmaus 3129165a1c Add ConnectionConfiguration.setHostAddress(InetAddress)
In previous Smack versions, it was possible to set the host's IP
address via setHost(String), this is no longer possible (since the
support for DNSSEC was introduced). The new
setHostAddress(InetAddress) allows it again to explicitly specifiy the
XMPP service's host IP.
2016-12-28 23:18:28 +01:00
Florian Schmaus 9165e818d9 Add ParenPad and NoWhitespaceAfter checkstyle rules 2016-11-29 12:01:41 +01:00
Florian Schmaus 5a47f56cd0 Call shutdown() before throwing
Follow up on a9d5cd4a61 /
059ee99ba0 (SMACK-739).
2016-11-15 07:20:58 +01:00
Florian Schmaus a9d5cd4a61 Move TLS Required check at the end of connect()
It was a *very* bad idea to perform the SecurityMode.Required check in
the connection's reader thread and not at the end of
AbstractXMPPConnectin's connect(). :/

This behavior dates back to 8e750912a7

Fixes SMACK-739
2016-11-12 11:59:06 +01:00
Florian Schmaus 013f4d630a Move duplicate code in AbstractXMPPConnection
from XMPP(TCP|BOSH)Connection.
2016-11-12 11:03:44 +01:00
Florian Schmaus a1630d033e Add support for DNSSEC/DANE
This closes the cycle which started with a GSOC 2015 project under the
umbrella of the XSF adding DNSSEC/DANE support to MiniDNS.

Fixes SMACK-366.
2016-10-31 10:45:38 +01:00
Florian Schmaus 45feaecdf7 Make XMPPError imutable and add stanza reference 2015-12-09 10:48:52 +01:00
damencho 035bbea837 Reply with service-unavailable for unhandled IQ requests
instead of feature-not-implemented.

Changes to send service-unavailable for not handled iq as said in
RFC6120 § 8.4: https://tools.ietf.org/html/rfc6120#page-128

"""
o  If an intended recipient receives an IQ stanza of type "get" or
   "set" containing a child element qualified by a namespace it does
   not understand, then the entity MUST return an IQ stanza of type
   "error" with an error condition of <service-unavailable/>.
"""
2015-12-06 17:09:47 +01:00
Florian Schmaus 8dcb3c11ff Smack 4.1.5
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQF8BAABCgBmBQJWUjTuXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
 ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQxMzU3QjAxODY1QjI1MDNDMTg0NTNEMjA4
 Q0FDMkE5Njc4NTQ4RTM1AAoJEIysKpZ4VI41zp8H/iRB0CtFvxVBFwRpP2HB0Iyc
 VzdxJTVXgJ7s8V3Us2Gmm0chUvs1wybshIdZ090NX7huZ4F1rWrOP7qt9S4soKgX
 LNdKTKTTNJ61jktLkG1HjA8yJr1Zu+XFK10Ne8997N9TnhbcVYAhsuTb8SRE8dlE
 G1Qihe2guJCCnWJhz9bsCXyAFt/fM5rSb/sgs/kXkE1W5bYeMHpFMvqMfab8NPBP
 fkt/NSxfqLfrRJneynnSwGSvRitDxpfRCcxLktTdDO31eryayIyiQIhaUhFYIGJQ
 tKx0/7HdCkgdUueBdtoQ/O02rjJ+kYqN2F3CErcIbB//3R6WKNF61XzOY81egYc=
 =dklO
 -----END PGP SIGNATURE-----

Merge tag '4.1.5'

Smack 4.1.5
2015-11-22 23:14:02 +01:00