1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-11-11 02:25:57 +01:00
Commit graph

4651 commits

Author SHA1 Message Date
Florian Schmaus
2663a62033 Filter smack-bosh from smack-android dependencies
smack-bosh was recently added to androidProjects, but it was not
filtered out from the dependencies for smack-android. Since it is an
optional dependency, it should not be a dependency of smack-android.
2015-02-19 13:20:58 +01:00
Florian Schmaus
5f4374ec26 Use host(name) to construct the SSLSocket
in XMPPTCPConnection.

So that the hostname and not the IP is available to the SSLSocket and
the SSLSession, which handed over to HostnameVerifier. This leaves the
HostnameVerifier with the

- name of the XMPP service (first argument of verify(String, SSLSession)
- name of the used host (found in the SSLSession)

allowing more complex verification mechanisms performed by the
HostnameVerifier.
2015-02-19 12:14:16 +01:00
Florian Schmaus
887c6114b7 Add filter information to NoResponseException
in order to aid debugging errors. This made it necessary to override
'toString()' for all filters in Smack.
2015-02-19 12:14:16 +01:00
Florian Schmaus
d415661e35 Add BundleAndDeferCallback to smack-tcp 2015-02-19 12:14:10 +01:00
Florian Schmaus
aa8daba1cf Add StreamManagemtCounterError
to allow graceful connectionClosedOnError() disconnects, since we
received a bunch of reports where the counter seems wrong, which is
causing a NPE in a thread pool executor, causing the VM or Android App
to terminate.

Now we throw the StreamManagementCounterError instead.
2015-02-18 12:07:44 +01:00
Florian Schmaus
7897fca876 Add comment about Stream Management's unacked stanzas queue 2015-02-18 11:59:45 +01:00
Florian Schmaus
33cf205bdc Use Objects.requireNonNull() in BytestreamSIDFilter 2015-02-18 10:06:12 +01:00
Florian Schmaus
98cfad6cc6 Add RosterLoadedListener 2015-02-17 16:56:04 +01:00
Florian Schmaus
5bb4727c57 Use Jid (and subclasses) from jxmpp-jid
Fixes SMACK-634
2015-02-17 16:07:16 +01:00
Florian Schmaus
b910d026cd Remove toString form XMPPException subclasses
and getMessage(), to use the implementations in Exception instead.
2015-02-16 14:51:37 +01:00
Florian Schmaus
1577fa1fca Fix duplicate presence in XMPPBOSHConnection.shutdown() 2015-02-16 14:51:10 +01:00
Florian Schmaus
a0d3314b26 Smack 4.1.0-rc2-SNAPSHOT 2015-02-15 21:13:48 +01:00
Florian Schmaus
0ee2d9ed1e Remove deprecated Packet class 2015-02-14 16:21:26 +01:00
Florian Schmaus
bc61527bd2 Expose InterruptedException
SMACK-632
2015-02-14 14:57:33 +01:00
Florian Schmaus
43b99a2a85 Smack 4.2.0-alpha1-SNAPSHOT 2015-02-14 09:36:52 +01:00
Florian Schmaus
8a32d22739 Smack 4.1.0-rc1 2015-02-14 09:36:31 +01:00
Florian Schmaus
26f4528698 Rename SecurityMode.enabled to 'ifpossible'
Using the term 'enabled' was a terriable choice from a security
perspective, as it gives the user the impression that the security is
"enabled". In fact this setting is only slightly better then
"disabled".

Make that fact clear in the javadoc too.
2015-02-13 17:01:09 +01:00
Florian Schmaus
0d19b56fbb Support all primitive types in IntrospectionProvider
Fixes SMACK-453
2015-02-12 14:01:01 +01:00
Florian Schmaus
90ccd6c40e Use string switch/case in IntrospectionProvider 2015-02-12 13:36:14 +01:00
Florian Schmaus
57c1b57b7c s/ a XMPP/ an XMPP/ 2015-02-12 12:13:19 +01:00
Florian Schmaus
a927d55bb1 Improve XMPPConnection javadoc
It's an interface

State that it does intentionally not declare any state changing
methods (e.g. connect(), disconnect())
2015-02-12 12:09:53 +01:00
Florian Schmaus
2853ec39b4 Fix XMPPConnection javadoc
The XMPPConnection interface does not define methods to manipulate the
connection state (e.g. connect(), disconnect()). The example should use
the connection type as declared type.
2015-02-11 17:37:34 +01:00
Florian Schmaus
b7ac16c1fb Add missing 'break' statement in BOSHPacketReader 2015-02-10 16:36:34 +01:00
Florian Schmaus
96e3d5c533 Add XMPPTCPConnection(CharSequence, String) constructor 2015-02-09 07:35:16 +01:00
Florian Schmaus
943dc29f92 Move vCard unit test into its own package 2015-02-09 07:35:15 +01:00
Chris Deering
0b4072ad66 Re-implementing the vCard provider using a pull parser. Extended unit tests. 2015-02-09 07:35:15 +01:00
Florian Schmaus
1630b44b8d Reset smSessionId on XMPPTCPConnection.disconnect() 2015-02-09 07:35:15 +01:00
Florian Schmaus
a0cf121d7a Make cached executor service use linked blocking queue
Since e6045c6593 the cached executor
services maximum pool size is limited to concurrencyLevel (was
previously Integer.MAX_VALUE). In order to prevent
RejectExecutionException we need to use an queue which max size is
greater than 1 (i.e. nont an SynchronousQueue).

Connection closed with error java.util.concurrent.RejectedExecutionException: Task org.jivesoftware.smack.tcp.XMPPTCPConnection$2@41dce200 rejected from java.util.concurrent.ThreadPoolExecutor@41d59150[Running, pool size = 3, active threads = 3, queued tasks = 0, completed tasks = 4]
 	at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2011)
 	at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:793)
 	at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1339)
 	at org.jivesoftware.smack.AbstractXMPPConnection.asyncGo(AbstractXMPPConnection.java:1583)
 	at org.jivesoftware.smack.tcp.XMPPTCPConnection.processHandledCount(XMPPTCPConnection.java:1655)
 	at org.jivesoftware.smack.tcp.XMPPTCPConnection.access$2300(XMPPTCPConnection.java:137)
 	at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.parsePackets(XMPPTCPConnection.java:1083)
 	at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.access$200(XMPPTCPConnection.java:896)
 	at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader$1.run(XMPPTCPConnection.java:911)
 	at java.lang.Thread.run(Thread.java:841)
2015-02-09 07:35:15 +01:00
Florian Schmaus
3b8f4c144e Add missing space in log statement within XMPPTCPConnection 2015-02-09 07:35:15 +01:00
Florian Schmaus
e0a2441c62 Add Stanza.hasStanzaIdSet() 2015-02-09 07:35:07 +01:00
Florian Schmaus
1190edad0f Add 'Packet' interface
to aid transition to the new 'Stanza' class ('Packet' was renamed to
'Stanza' a few commits before this).
2015-02-06 09:34:58 +01:00
Florian Schmaus
772da6bfa0 Fix connections.md: It's 'XMPPTCPConnectionConfiguration.Builder'
added the missing dot ('.'). The Builder was renamed a while ago.
2015-02-06 09:34:58 +01:00
Florian Schmaus
a5beb7bd79 Add Stanza.getExtensions(String,String) 2015-02-06 09:34:58 +01:00
Florian Schmaus
4698805a34 Rename 'Packet' class to 'Stanza'
Smack still uses the term 'Packet' in some places. This is just the
first step towards using correct XMPP terms in Smack.
2015-02-06 09:34:51 +01:00
Florian Schmaus
9fc26f1d83 Use MultiMap for Stanza extension elements 2015-02-05 11:04:38 +01:00
Florian Schmaus
e977c349a8 Add documentation/developer/provider.md
also fix stanzas.md
2015-02-04 16:34:10 +01:00
Florian Schmaus
5c16fdb017 Make Presence.getMode() return available if null 2015-02-03 19:32:08 +01:00
Florian Schmaus
4013c68584 Use Objects.requireNonNull() in Presence
Also make Objects.requireNonNull() throw NullPointerException to match
the original API behavior.
2015-02-03 19:32:04 +01:00
Florian Schmaus
34ce7929a8 Smack 4.1.0-beta3-SNAPSHOT 2015-02-02 13:14:45 +01:00
Florian Schmaus
4b215814db Smack 4.1.0-beta2 2015-02-02 13:04:47 +01:00
Florian Schmaus
4a769b0262 Throw IAE in IQReplyFilter if there is no local JID
available yet.
2015-01-30 09:37:55 +01:00
Florian Schmaus
5a56ff011b Add XMPPConnection.getStreamId()
and remove getConnectionID().

Also make streamId a field of AbstractXMPPConnection. Most XMPP
connection types have a streamId, it appears to be optional when BOSH
is used though.
2015-01-28 17:14:33 +01:00
Florian Schmaus
612ca1ad9d Use CharSequence instead of String for username
in XMPPTCPConnection's constructor.
2015-01-28 09:34:01 +01:00
Florian Schmaus
37081b2810 Send more information with the stream open tag 2015-01-28 09:31:28 +01:00
Florian Schmaus
e493500cfe Consider XMPP service name in isSubscribedToMyPresence() 2015-01-27 09:45:50 +01:00
Florian Schmaus
ed4d815fba Make Message.setType(Type) not throw if type is null
RFC 6121 § 5.2.2:
"""
If an application receives a message with no 'type' attribute or the
application does not understand the value of the 'type' attribute
provided, it MUST consider the message to be of type "normal" (i.e.,
"normal" is the default).
"""
2015-01-26 20:47:14 +01:00
Florian Schmaus
3299515b36 Make Roster.isRosterVersioningSupported public 2015-01-26 20:47:14 +01:00
Florian Schmaus
7348e8bc8b Add Roster.getEntriesAndAddListener(RosterListener,RosterEntries) 2015-01-26 20:47:14 +01:00
Florian Schmaus
86ea027301 Add StringUtils.requireNotNullOrEmpty and Objects.requireNonNull
and use this in a few places.
2015-01-26 20:47:09 +01:00
Florian Schmaus
603f64166b Improve Roster, RosterEntry and RosterGroup
Use final where possible, add javadoc. Fix duplicate comment in
Roster.

Use createPacketCollectorAndSend(packet).nextResultOrThrow when
possible, and only set the entry name if the IQ set is successful.
2015-01-26 16:24:32 +01:00