Florian Schmaus
c86d6e3b61
Update README.md's ChatManager example to new API
2014-04-08 18:26:47 +02:00
XiaoweiYan
afa4ce5773
Fix not-well-format packet exception when set property for packet
2014-04-08 12:04:56 +02:00
Florian Schmaus
5832236578
Cleanup SASLErrorException
...
Reuse the constructor and append only the SASLError String to the
Exceptions message (previously the full SASLError stanza was printed).
2014-04-05 18:42:32 +02:00
Florian Schmaus
0c29fdb769
Use WeakHashMap in BookmarkManager and PrivateDataManager
...
Also remove the "other user" constructor fo PrivateDataManager, as
this feature is not specified by XEP-49.
Fixes SMACK-554
2014-04-04 11:55:06 +02:00
Florian Schmaus
ef43ba6322
Fix or suppress warnings
2014-04-03 23:06:26 +02:00
Florian Schmaus
d8a5610d7b
Use Locale.US when doing String operations
...
on machine readable output. The default locale may not provide the
wanted mapping. See also
http://developer.android.com/reference/java/util/Locale.html#default_locale
SMACK-467
2014-04-03 22:50:13 +02:00
Florian Schmaus
94adaf8e50
Always transform 'from' to lower case in FromMatchesFilter
2014-04-03 14:36:08 +02:00
Florian Schmaus
a016910baf
Use toLowerCase(Locale.US) in FromMatchesFilter
2014-04-03 14:35:10 +02:00
Florian Schmaus
4a60a68802
Move DEBUG_ENABLED from XMPPConnection to SmackConfiguration
2014-04-03 13:10:30 +02:00
Florian Schmaus
3c2f794522
Remove no-ops in TCPConnection
...
those are the defaults anyway.
2014-04-03 13:08:42 +02:00
Florian Schmaus
bd96816102
Add setter and javadoc for packet reply timeout
2014-04-03 10:59:00 +02:00
Florian Schmaus
246e7b85f8
Use connection's reply timeout value in MultiUserChat
2014-04-03 10:58:50 +02:00
Florian Schmaus
665d65836c
Cleanup of pingMyServer() API
...
only throw NotConnectedException, otherwise return false. Before as
some sort of exception was always thrown in the error case.
2014-03-28 16:20:09 +01:00
Florian Schmaus
17a254edca
Fix SmackConfiguration disabledSmackClasses
...
contains() should ckeck against 'classToLoad' not 'name'.
2014-03-28 14:46:30 +01:00
Florian Schmaus
a83b44e102
Add support for CustomSmackConfiguration class
...
with DISABLED_SMACK_CLASSES String[] option.
2014-03-28 14:46:30 +01:00
Florian Schmaus
a1227b78cc
Fix log message in SmackConfiguration
...
Those startup classes could be specified in other files besides
smack-config.xml
2014-03-28 14:46:30 +01:00
Florian Schmaus
8321948b3c
Add log to DNSUtil
2014-03-28 14:46:30 +01:00
Florian Schmaus
fa71ff9605
Fixed NPE in FromMatchesFilter
...
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.
2014-03-28 14:46:30 +01:00
Florian Schmaus
c59a6010e1
Return empty list instead of null in DNSUtil
2014-03-28 14:46:30 +01:00
Florian Schmaus
42d0557682
Use gradle dynamic versioning for dnsjava
2014-03-28 14:46:30 +01:00
Florian Schmaus
dce0c55011
Remove cache from DNSUtils
...
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.
2014-03-28 14:46:30 +01:00
Florian Schmaus
2250944ca6
Further improved logging in SmackConfiguration
2014-03-28 14:46:30 +01:00
Florian Schmaus
53ca314b50
Cleanup SASLAuthentication
...
- Synchronized as method keyword
- Removed star import
2014-03-28 14:46:30 +01:00
Florian Schmaus
c4f86762cb
Reworked DiscoverInfo and DiscoverItems
...
- Change the return type from Iterator to List
- Remove the synchronized blocks
2014-03-28 14:46:30 +01:00
Florian Schmaus
2619a63c21
Log loaded classes by SmackConfiguration
2014-03-28 14:46:30 +01:00
Florian Schmaus
cc026a7e85
Raise source compatibility to 1.7 (Java7)
...
Now that Java 8 is released, it's time to raise Smack's source
compatibility. Let's also use some of the "new" Java 7 features like
"catch multiple".
2014-03-24 19:23:06 +01:00
Florian Schmaus
18d0dbdc5f
Fix Socks5BytestreamManager.determineProxies()
...
We need to catch XMPPErrorException and *NoResponseException* and
blacklist those entities.
2014-03-23 14:57:18 +01:00
Florian Schmaus
010a86444a
Streamline LastActivity API, add enable/disable
...
Allow LastActivity to be enabled/disabled. The API is now similar to the
ones of the other Managers. Added unit tests.
2014-03-23 14:19:05 +01:00
Florian Schmaus
978f692eb0
Use XmlStringBuilder in most toXML() bodies
...
Also change StringUtils.escapeForXML() and Packet.toXML() to return
CharSequence instead of String. XmlStringBuilder now has 'optX' methods.
Remove XmlUtils in favor of XmlStringBuilder
2014-03-22 16:59:15 +01:00
Florian Schmaus
1cf4681581
Always lookup DNS SRV RR on connect()
2014-03-20 17:08:46 +01:00
Florian Schmaus
363354f237
Make DirectoryRosterStore use elements for whitespace content
...
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.
2014-03-20 14:35:38 +01:00
Florian Schmaus
6b4c53bfc5
Renamed DefaultRosterStore to DirectoryRosterStore
2014-03-20 13:36:08 +01:00
Florian Schmaus
1bf57cb6a1
Move file related methods to FileUtils
2014-03-20 13:26:57 +01:00
Florian Schmaus
4a366007d6
Merge pull request #3 from Tsyko/xep-0332
...
Initial implementation of "HTTP over XMPP transport" (XEP-0332)
2014-03-20 12:25:24 +01:00
atsykholyas
236ea71cee
Added support for HOXT (XEP-0332)
...
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.
2014-03-20 12:36:04 +02:00
Florian Schmaus
fcc8414a92
"not connected" is now a checked Exception thrown by sendPacket()
...
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
2014-03-19 15:56:41 +01:00
Florian Schmaus
d8c656270e
Switch jbosh to 0.8.0-SNAPSHOT
2014-03-19 13:14:03 +01:00
Florian Schmaus
d349940537
Move DNS resolving into connect()
...
It was misplaced in ConnectionConfiguration anyways, as the sole
instantiation of a ConnectionConfiguration should not cause any network
I/O.
2014-03-19 13:14:03 +01:00
Florian Schmaus
dbab9b8995
Unify StringUtils.escapeForXML()
...
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.
2014-03-19 13:13:02 +01:00
Florian Schmaus
c592b4f046
Improve Exceptions (SMACK-426)
2014-03-19 09:00:10 +01:00
Florian Schmaus
9c8d7af3bf
Fix error handling in BOSHConnection
...
getCause() never throws. Not sure why the code was written that
way. Thanks to CSH for reporting.
2014-03-19 09:00:10 +01:00
Florian Schmaus
44a5408bc0
Move host/port from ConnectionConfiguration to XMPPConnection
...
There semantic is that they now report the host used to establish the
connection. Therefore BOSHConfiguration needs to hostAddresses for
getURI().
2014-03-19 09:00:10 +01:00
Florian Schmaus
81d49d2f60
ChatManager should not throw a NPE if 'from' is null
...
Fixes SMACK-551
2014-03-19 09:00:10 +01:00
Florian Schmaus
ec82f63191
Move sample/ into resources/
2014-03-19 09:00:10 +01:00
Florian Schmaus
ae64b0ad4b
Fix javadoc in MUCInitialPresence.History
2014-03-19 09:00:10 +01:00
Florian Schmaus
91f0a091df
Fix javadoc warning in xdata.Form
2014-03-19 09:00:10 +01:00
Florian Schmaus
4db967079f
getInstanceFor() for ChatManager and AccountManager
2014-03-19 08:59:45 +01:00
Florian Schmaus
6197f6200f
Move duplicate sendPacket() code into XMPPConnection
2014-03-17 19:52:52 +01:00
Florian Schmaus
c3f9ec4f94
Return the group if it exists in Roster.createGroup()
2014-03-17 19:21:20 +01:00
Florian Schmaus
a46d02ca32
Remove old Apache commons collections from codebase
...
ChatManager's Chat instances are now removed by Chat.close(), removing
the need for a Map with Hard to Weak references.
ChatStateManager can simply use WeakHashMap.
2014-03-17 14:47:55 +01:00