- 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
The minimal condition in order to check equality in XmlStringBuilder is
that 'other' implements the CharSequence interface. Not as it was
previously, that it's also a XmlStringBuilder.
This allows junit's assertEquals() to be used (to a certain extend).
Setting `jid` to `null` was probably not the intended behaviour of this constructor and means that the `IQReplyFilter` will later reject responses that it shouldn't, because the `AbstractXmppConnection` will automatically construct a JID based on the authenticated username.
In particular, this breaks attempting to connect to the PVP.net XMPP server.
inverse boolean condition, correct is: "if packetListener has been
removed, then we received no response" and add check for
exceptionCallback being null.
also remove faulty PongFilter from PingManager. It never matched any
stanzas, since a Pong is just a plain result IQ that is not qualified by
any XMPP Ping namespace.
Fixes SMACK-597
You can set your custom debugger class as before, by using clear api
method ReflectionDebuggerFactory.setDebuggerClass, or you can set custom
debugger factory using SmackConfiguration.setDebuggerFactory if it's not
enough flexible for your needs
This will help to get rid of repetitive class casts, and make
PacketCollector api more inline with itself (since some methods
are already generic return methods).
every SASL Mechanism is designed as a byte array based protocol. XMPP
adds the constraint that the challenges and responses are send base64
encoded. It's therefore better API design to let getAuthenticationText()
return byte[] instead of String.
This is a follow up on 6caf2cbdb5 where IQReplyFilter was changed so
that getUser() must not return null. But this is the case in
AccountManager where no resource binding has taken place and the user is
therefore not set.
The fix is the same as in 6caf2cbdb5, instead of IQReplyFilter we
simply use a PacketIDFilter.
as the local username is only available after binding (and legacy
session establishment). This makes Smack compatible again with XMPP
services that use the user's JID as from attribute in the result IQ
after the bind set IQ, e.g. Facebook:
SENT:
<iq id='sqvTK-1' type='set'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<resource>Smack</resource>
</bind>
</iq>
RCV:
<iq from='user.name.1@chat.facebook.com' id='sqvTK-1' type='result'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<jid>user.name.1@chat.facebook.com/Smack</jid>
</bind>
</iq>
Fixes SMACK-590