1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-10 14:16:00 +01:00
Commit graph

17 commits

Author SHA1 Message Date
Florian Schmaus
246e7b85f8 Use connection's reply timeout value in MultiUserChat 2014-04-03 10:58:50 +02: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
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
ae64b0ad4b Fix javadoc in MUCInitialPresence.History 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
64e7b8a868 Move getRoster() to XMPPConnection
Also remove the Exceptions from the signature of getRoster().

Extend ConnectionListener with connected() and authenticated()
callbacks, required by Roster to be notified so that the Roster can be
loaded *after* login.
2014-03-15 11:21:49 +01:00
Florian Schmaus
4b56446e40 Introduce SmackException
SmackException (and it's subclasses) is for all errors/exceptions not
defined by any XMPP specification. XMPPException is now an abstract
class for all errors defined by the XMPP specifications.

Methods that involve an IQ exchange now either return the result, which
is obtained by IQ response, or they throw an XMPPErrorException if an IQ
error was the result of the IQ set/get. If there was no response from
the server within the default packet timeout, a NoResponseException will
be thrown.

XMPP SASL errors are now also reported accordingly.

SMACK-426
2014-03-14 01:46:42 +01:00
Florian Schmaus
489816c61f Renamed Connection to XMPPConnection 2014-03-10 09:45:50 +01:00
Lars Noschinski
86a4bfa43f Remove deprecated constructor for FromMatchesFilter (SMACK-71) 2014-03-09 11:20:32 +01:00
Florian Schmaus
0e49b23687 Use correct namespace for MUC.getAdmins()
Fixes (again) SMACK-371
2014-03-01 15:38:07 +01:00
Florian Schmaus
54a421e84e Make JUL Loggers final (SMACK-536) 2014-02-26 22:00:27 +01:00
Florian Schmaus
7bd7b3d24c Improve packet send and result collecting API
Instead of repeating the same pattern, when sending an IQ get/set packet
and collecting the response

PacketFilter filter = new PacketIDFilter(request.getPacketID()),
PacketCollector collector = connection.createPacketCollector(filter);
connection.sendPacket(reg);
IQ result = (IQ)collector.nextResult(SmackConfiguration.getPacketReplyTimeout());
// Stop queuing results
collector.cancel();
if (result == null) {
    throw new XMPPException("No response from server.");
}
else if (result.getType() == IQ.Type.ERROR) {
    throw new XMPPException(result.getError());
}

the API got redesigned, so that the above code block can be replaced
with

Packet result = connection.createPacketCollectorAndSend(request).nextResultOrThrow();
2014-02-18 19:39:47 +01:00
Florian Schmaus
d069e1be64 Normalize newlines to '\n'
Change all \r\n into unix style newlines. Add missing newlines at the
end of a file and activate the newline checkstyle module, that enforces
'\n' as newline and a newline at the end of every file.
2014-02-17 23:58:40 +01:00
Florian Schmaus
1e57f1c659 Activate checkstyle and add missing license headers
Delete also all "All rights reserved" statements, as they are
unnecessary and conflict with checkstyle's header check. Delete unused
imports.
2014-02-17 20:09:55 +01:00
Florian Schmaus
2e11470aee Code cleanup: unused imports, values, blocks, etc. 2014-02-17 08:24:10 +01:00
Florian Schmaus
8d3814a8a7 New API design (SMACK-545) 2014-02-15 13:03:47 +01:00
Florian Schmaus
201152ef42 Migrate from Ant to Gradle (SMACK-265) 2014-02-14 18:46:33 +01:00