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.