Florian Schmaus
ce1cddc722
More checkstyle whitespace related checks
2017-05-24 14:42:38 +02:00
Florian Schmaus
0a6843f41f
Make StreamNegotiator weakly reference XMPPConnection
...
by extending Manager.
Because FileTransferNegotiator will hold a strong reference to the
StreamNegotiators, which will eventually prevent XMPPConnection from
being GC'ed if no weak references in StreamNegotiator are used.
Thanks to Werner Glanzer for pointing this out.
2017-03-15 21:17:49 +01:00
Florian Schmaus
4c646436a5
Bump "Error Prone" to 2.0.15
...
and fix a few things :)
2017-02-11 16:16:41 +01:00
Florian Schmaus
ef0af66b21
Enfore spaces for indentation
...
Although I'm in the tabs camp, Smack uses mostly spaces. Therefore it
is the logical choice for the indentation style.
2017-02-07 22:10:10 +01:00
Florian Schmaus
7c46f58c80
Rename "PacketReplyTimeout" → "ReplyTimeout"
2017-01-12 20:57:19 +01:00
Florian Schmaus
90a5e289f8
s/processPacket/processStanza/ s/PacketCollector/StanzaCollector/
2017-01-03 11:35:04 +01:00
Florian Schmaus
d976434bb3
Improve message of XMPPErrorException
...
by including the XMPP entity which send the XMPP error reply to us.
Also cleanup the no longer used constructors.
2016-11-29 16:40:08 +01:00
Florian Schmaus
45feaecdf7
Make XMPPError imutable and add stanza reference
2015-12-09 10:48:52 +01:00
Florian Schmaus
9a00e09c0a
Improve NoResponseException messages
2015-06-02 17:30:57 +02:00
Florian Schmaus
c125a3b055
Bump jxmpp to 0.5.0-alpha4
2015-05-27 19:29:51 +02:00
Florian Schmaus
265e5c69d5
Use LinkedHashMap for form fields
...
for efficient lookup.
2015-04-12 19:27:22 +02:00
Florian Schmaus
b4694ec152
Add FinalClass checkstyle check
...
And mark affected classes final.
2015-04-06 10:45:12 +02:00
Florian Schmaus
de528eee67
Add JavadocPackage checkstyle
...
change from package.html to package-info.java. Add missing
package-info.java with a placeholder description.
2015-04-04 17:16:47 +02:00
Florian Schmaus
64d134052d
Enable javadoc checkstyle
...
and fix violations.
2015-03-29 12:29:32 +02:00
Florian Schmaus
c6594aec2f
Lint fixes: Remove dead code, etc.
...
- make method static when possible
- remove never thrown Exception declarations
- other fixes
2015-03-24 18:33:47 +01:00
Florian Schmaus
83b84c5bd3
Merge branch '4.1'
...
Conflicts:
smack-core/src/main/java/org/jivesoftware/smack/StanzaListener.java
smack-core/src/main/java/org/jivesoftware/smack/XMPPConnection.java
smack-core/src/main/java/org/jivesoftware/smack/packet/Stanza.java
smack-core/src/main/java/org/jivesoftware/smack/util/PacketParserUtils.java
version.gradle
2015-03-24 17:16:18 +01:00
Florian Schmaus
f546d28ad8
Xlint all the things
...
and fix all warnings.
2015-03-23 09:28:49 +01:00
Florian Schmaus
5e86db4f80
Substitute 'packet' with 'stanza(/packet)' in javadoc
2015-03-21 09:36:28 +01:00
Florian Schmaus
5188c6f934
Add checkstyle check for space(s) after tab(s)
2015-03-18 21:51:25 +01:00
Florian Schmaus
701aa7d9c4
Merge branch '4.1'
...
Conflicts:
smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java
smack-core/src/main/java/org/jivesoftware/smack/PacketCollector.java
smack-core/src/main/java/org/jivesoftware/smack/PacketListener.java
smack-core/src/main/java/org/jivesoftware/smack/XMPPConnection.java
smack-core/src/main/java/org/jivesoftware/smack/debugger/SmackDebugger.java
smack-core/src/main/java/org/jivesoftware/smack/packet/Packet.java
smack-core/src/main/java/org/jivesoftware/smack/util/XmlStringBuilder.java
smack-core/src/test/java/org/jivesoftware/smack/ThreadedDummyConnection.java
smack-extensions/src/main/java/org/jivesoftware/smackx/address/provider/MultipleAddressesProvider.java
smack-extensions/src/main/java/org/jivesoftware/smackx/bytestreams/ibb/DataListener.java
smack-extensions/src/main/java/org/jivesoftware/smackx/filetransfer/FaultTolerantNegotiator.java
smack-extensions/src/main/java/org/jivesoftware/smackx/filetransfer/IBBTransferNegotiator.java
smack-extensions/src/main/java/org/jivesoftware/smackx/filetransfer/Socks5TransferNegotiator.java
smack-extensions/src/main/java/org/jivesoftware/smackx/filetransfer/StreamNegotiator.java
smack-extensions/src/main/java/org/jivesoftware/smackx/muc/MultiUserChat.java
smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/LeafNode.java
smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/Node.java
smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/PubSubManager.java
smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/packet/PubSub.java
smack-extensions/src/main/java/org/jivesoftware/smackx/vcardtemp/VCardManager.java
smack-extensions/src/test/java/org/jivesoftware/smackx/receipts/DeliveryReceiptTest.java
smack-im/src/main/java/org/jivesoftware/smack/chat/ChatManager.java
smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/JingleSession.java
smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/provider/JingleProvider.java
smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/packet/UserID.java
smack-legacy/src/main/java/org/jivesoftware/smackx/xroster/provider/RosterExchangeProvider.java
smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java
version.gradle
2015-03-04 22:42:36 +01:00
Florian Schmaus
ed4fa3390f
Add XMPPConnection.sendStanza(Stanza)
...
and deprecate sendPacket().
2015-03-04 21:46:44 +01:00
Florian Schmaus
dde0cfd7f6
Fix incoming file transfers
...
With bb8dcc9874
the concept if IQ request
handlers was introduced in Smack. This doesn't allow packet/stanza
collectors/listeners to filter for incoming IQ requests. Unfortunately
the file transfer code relied on this being able, so it broke with the
change.
There were two places where the file transfer code was listening for
incoming IQ requests:
- InitationListener(s)
- Negotiator(s)
With this change, we let the InitiationListener signal the existence of
an incoming initation request, send by an IQ of type 'set', using the
newly created EventManager utility.
The negotiator waits for those events to arrive and proceedes as it would
have done when the packet collector was used.
2015-03-02 15:56:26 +01:00
Florian Schmaus
d4a6d8e653
Rename PacketFilter (and implementing classes) and PacketExtension
...
to StanzaFilter and ExtensionElement.
2015-02-28 13:49:38 +01:00
Florian Schmaus
fbf0ba13ce
Merge Smack 4.1.0-rc2
...
Conflicts:
smack-core/src/main/java/org/jivesoftware/smack/filter/FromMatchesFilter.java
smack-extensions/src/main/java/org/jivesoftware/smackx/iqregister/AccountManager.java
version.gradle
2015-02-21 18:07:45 +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
33cf205bdc
Use Objects.requireNonNull() in BytestreamSIDFilter
2015-02-18 10:06:12 +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
bc61527bd2
Expose InterruptedException
...
SMACK-632
2015-02-14 14:57:33 +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
b0cecee710
Rename IQ.ELEMENT to IQ.IQ_ELEMENT
...
to avoid confusion between the IQ element 'iq' and the IQs child
element. ELEMENT defined in an IQ sublcass should contain the *child*
element.
Add element to StreamInitation and fix FileTransferManager which still
used a packet listener instead of an IQ request handler to handle
incoming stream initiation requests.
2015-01-11 21:54:46 +01:00
Florian Schmaus
f1a1215f35
Make DataForm type an enum
2015-01-10 20:10:46 +01:00
Florian Schmaus
f029b576a5
Add XMPPConnection.addAsyncPacketListener(PacketListener, PacketFilter)
...
and use this method in packet listeners that previously used Async.go().
2014-12-30 20:45:17 +01:00
Florian Schmaus
755765120d
Make FormField.Type an enum
2014-12-27 21:12:48 +01:00
Florian Schmaus
9286a1decb
Rework XMPP Error class design
...
Introduce AbstractError, change 'Conditions' to enums. Because of
AbstractError, it was necessary that PlainStreamElement and
TopLevelStreamElement becomes an interface. Thus the implementation of
TopLevelStreamElement.toString() had to be removed.
This adds
- policy-violation
- unexpected-request
to XMPPError.Condition, and removes the
- payment-required
- remote-server-error
- unexpected-condition
- request-timeout
Conditions
The file transfer code does now no longer throw XMPPErrorExceptions, but
SmackExceptions.
Fixes SMACK-608. Makes it possible to resolves SMACK-386.
2014-11-25 13:19:32 +01:00
Florian Schmaus
def8fea05f
Add reply timeout to NoResponseException message
2014-11-15 09:46:38 +01:00
Florian Schmaus
98a3c46e9a
Add XMPPConnection.createPacketcollectorAndSend(PacketFilter, Packet)
...
Using
createPacketCollector(filter);
sendPacket(packet);
was error prone, i.e. the PacketCollector could leak if sendPacket()
would throw an exception and the user forgot to call
PacketCollector.cancel(). For cases where
createPacketCollectorAndSend(IQ) is not sufficient (because we don't
send IQs), createPacketCollectorAndSend(PacketFilter, Packet) is now
used, which does take care that the PacketCollector does not leak if
sendPacket() throws an Exception.
2014-10-13 10:45:00 +02:00
Florian Schmaus
d8db43e4c5
Improve FileTransfer.writeToStream()
...
let's use the standard idiom for Input- to OutputStream transfers. This
also avoids an initial no-op on the first write, when the count is '0'.
Also fixes a bug when the size of file/stream transferred is '0' (which
is perfectly fine and possible).
2014-09-09 21:06:12 +02:00
Florian Schmaus
218dc66cf7
Filetransfer API should not wrap IOException
...
into SmackException.
2014-08-26 15:26:37 +02:00
Florian Schmaus
191c4429da
Fix FileTransferManager invoking request listeners
...
those need to be called asynchronously.
Also add a small API for that.
2014-08-26 13:50:42 +02:00
Florian Schmaus
856b4a6090
Make FaultTolerantNegotiator respect packetReplyTimeout
2014-08-26 12:04:52 +02:00
Florian Schmaus
7277eb553a
Enable more 'checkstyle' checks
...
AvoidStarImport
IllegalImport
RedundantImport
UpperEll
ArrayTypeStyle
GenericWhitespace
EmptyStatement
PackageDelcaration
2014-08-15 23:17:45 +02:00
Florian Schmaus
d10ff92d44
Use createPacketCollectorAndSend in FileTransferNegoiator
...
also fixes a potential PacketCollector leak.
2014-08-04 20:04:39 +02:00
Florian Schmaus
7735a5224c
Merge branch '4.0'
...
Conflicts:
smack-extensions/src/main/java/org/jivesoftware/smackx/filetransfer/FileTransferManager.java
smack-extensions/src/main/java/org/jivesoftware/smackx/filetransfer/FileTransferNegotiator.java
smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/Node.java
smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/PubSubManager.java
smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/ibb/InBandBytestreamRequestTest.java
smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/ibb/InitiationListenerTest.java
smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/socks5/InitiationListenerTest.java
2014-07-14 14:31:09 +02:00
Florian Schmaus
c063fb1376
Reply correct error code on XEP-65 Stream rejection
...
this was previously erroneously changed with
197548b548
from 'forbidden' to
'not-acceptable'. We now change it back to 'forbidden'.
Also delete FileTransferNegotiator.rejectStream(StreamInitation) because
it is dead code and add some comments and javadoc.
2014-07-12 13:52:54 +02:00
Florian Schmaus
cde6dd65b3
Fix typo: s/no_acceptable/not_acceptable
...
in XMPPError.Condition
2014-07-12 12:39:04 +02:00
Florian Schmaus
94a16ba41e
Merge branch '4.0'
...
Conflicts:
build.gradle
documentation/connections.html
documentation/gettingstarted.html
smack-core/src/main/java/org/jivesoftware/smack/SmackException.java
smack-core/src/test/java/org/jivesoftware/smack/parsing/ParsingExceptionTest.java
smack-core/src/test/java/org/jivesoftware/smack/test/util/TestUtils.java
smack-core/src/test/java/org/jivesoftware/smack/util/PacketParserUtilsTest.java
smack-extensions/src/main/java/org/jivesoftware/smackx/caps/cache/SimpleDirectoryPersistentCache.java
smack-extensions/src/main/java/org/jivesoftware/smackx/ping/PingManager.java
smack-tcp/src/main/java/org/jivesoftware/smack/tcp/PacketReader.java
2014-07-05 14:37:22 +02:00
Florian Schmaus
8526f8ab29
Introduce packet.Element
...
Re-work filetransfer/bytestream stanza toXML() method to use
XmlStringBuilder. Move the ELEMENT and NAMESPACE definitions in the
right place, ie. the stanza class.
2014-07-05 11:59:45 +02:00
Florian Schmaus
afd1f6bc36
Remove some duplicate code from smackx.filetransfer
...
packet.IQ provides all the utility functions we need. An extension should
never (re-)implemented it's own core functionality.
2014-07-04 23:17:15 +02:00
Florian Schmaus
09425609af
Refactor FileTransfer(Manager|Negotiator)
...
to use WeakHashMaps and extend Manager.
SMACK-579
2014-07-02 09:52:40 +02:00
Florian Schmaus
eec0df386c
s/JEP/XEP/
...
also s;jabber.org/jeps;xmpp.org/extensions;
2014-06-14 11:48:46 +02:00