If binding is required or not is told the client by the server within
the features stanzas. Smacks guarantees that connect() blocks until the
features stanzas has been received and processed.
Follow XEP-170 recommendations: Resource binding *after* compression.
Fixes also a bunch of race conditions related to the wait()/notify()
pattern used in the early stages of a Connection where
createPacketCollectorAndSend(Packet).nextResultOrThrow() can not be
used. Those wait()/notify() patterns are currently
- SASL authentication
- compression
- resource binding
Fixes SMACK-454
Code for Jive's packet properties should not be in 'core'. Also
de-serializing input from network causes some security implications, it
is therefore disabled as default.
MulitUserChat.create() will throw an SmackException if the MUC service
does not return a 201 status when entering a room. Some MUC
implementations don't return the 201 status but instead behave like
the room already existed.
If the user doesn't care about the room beeing locked until the
initial configuration has been send, he can now use the new
MutliUserChat.createOrJoin(String) method.
Also remove some duplicate code by creating the private enter() method.
Fixes SMACK-557
XMPP Servers should ignore the 'from' attribute of outgoing
stanzas. Makes the behavior how Smack populates the 'from' attribute of
outgoing stanzas configurable. Fixes SMACK-547
This allows us to exploid Java 8 streams and Java 5 for-each
loops. The returned Collections are usually unmodifiable. We decided
against returning Iterable because this would mean determining the
size in O(n) compared to Collection.size() which is often faster
(e.g. O(1)).
This commit renames classes as follows:
* TCPConnection --> XMPPTCPConnection
* BOSHConnection --> XMPPBOSHConnection
There are two reasons for this rename. First, it is there to indicate
that the classes actually _are_ XMPP connections, using different
transport mechanisms. Second, it makes auto-completion in IDEs easier,
the developer can type XMPP<complete> and choose the right backend.
in cases where a 'null' FromMatchesFilter was used and the processed
message would have a non-null 'from' attribute.
Thanks to sylvia for reporting this.
Caching of DNS RR should happen on the lowest possible layer, not within Smack:
- dnsjava does it's own caching
- resolving via the javax API should use the OS's caching (if any)
We don't need dozens layers of DNS RR caching.
Also change StringUtils.escapeForXML() and Packet.toXML() to return
CharSequence instead of String. XmlStringBuilder now has 'optX' methods.
Remove XmlUtils in favor of XmlStringBuilder
If whitespace (e.g. \n \t) needs to be preserved, then XML elements
should be used instead of attributes. Since we do this now in
DirectoryRosterStore, there is also no longer a need for an
specialized StringUtils.escapeForXML().
Also introduce XmlStringBuilder, which should become the default way
to implement Packet.toXML() and the like.
This is initial impementation of XEP-0332 (SMACK-552) -
HTTP over XMPP transport.
Created extensions, providers and unit tests.
Two features are missing: jingle and sipub.
There is a unsolveable race condition between the connection state and
sendPacket(), i.e. the connection could go down, right after the
method calling sendPacket is called, but before sendPacket() is
invoked. Before this change, sendPacket() has thrown an unchecked
IllegalStateException, which could be ignored by the Smack user, who
would also not notice the race condition. We have decided to throw a
checked Exception in this case now, to make the Smack user aware of
this situation.
SMACK-426
Rework StringUtils.escapeForXML() so that it can be used also for
StringUtils.xmlAttribEncodeBinary(). escapeForXML() now uses a
switch/case statement, which should leave the (JIT) compiler more room
for optimizations.
Removing the "do not escape unicode character references", because
this behavior, introduced with
8264ebdfb5, is incorrect.