1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-12-12 05:51:08 +01:00

Bump "Error Prone" to 2.0.15

and fix a few things :)
This commit is contained in:
Florian Schmaus 2017-02-11 16:16:41 +01:00
parent ef0af66b21
commit 4c646436a5
246 changed files with 1122 additions and 124 deletions

View file

@ -53,6 +53,7 @@ import org.jxmpp.jid.Jid;
*
* @see <a href="https://xmpp.org/extensions/xep-0296.html">XEP-0296: Best Practices for Resource Locking</a>
*/
@SuppressWarnings("FunctionalInterfaceClash")
public final class ChatManager extends Manager {
private static final Map<XMPPConnection, ChatManager> INSTANCES = new WeakHashMap<>();
@ -188,22 +189,84 @@ public final class ChatManager extends Manager {
return true;
}
public boolean addListener(IncomingChatMessageListener listener) {
/**
* Add a new listener for incoming chat messages.
*
* @param listener the listener to add.
* @return <code>true</code> if the listener was not already added.
*/
public boolean addIncomingListener(IncomingChatMessageListener listener) {
return incomingListeners.add(listener);
}
/**
* Add a new listener for incoming chat messages.
*
* @param listener the listener to add.
* @return <code>true</code> if the listener was not already added.
*/
@Deprecated
@SuppressWarnings("FunctionalInterfaceClash")
public boolean addListener(IncomingChatMessageListener listener) {
return addIncomingListener(listener);
}
/**
* Remove an incoming chat message listener.
*
* @param listener the listener to remove.
* @return <code>true</code> if the listener was active and got removed.
*/
@SuppressWarnings("FunctionalInterfaceClash")
public boolean removeListener(IncomingChatMessageListener listener) {
return incomingListeners.remove(listener);
}
public boolean addListener(OutgoingChatMessageListener listener) {
/**
* Add a new listener for outgoing chat messages.
*
* @param listener the listener to add.
* @return <code>true</code> if the listener was not already added.
*/
public boolean addOutgoingListener(OutgoingChatMessageListener listener) {
return outgoingListeners.add(listener);
}
public boolean removeOutoingLIstener(OutgoingChatMessageListener listener) {
/**
* Add a new listener for incoming chat messages.
*
* @param listener the listener to add.
* @return <code>true</code> if the listener was not already added.
* @deprecated use {@link #addOutgoingListener(OutgoingChatMessageListener)} instead.
*/
@Deprecated
@SuppressWarnings("FunctionalInterfaceClash")
public boolean addListener(OutgoingChatMessageListener listener) {
return addOutgoingListener(listener);
}
/**
* Remove an outgoing chat message listener.
*
* @param listener the listener to remove.
* @return <code>true</code> if the listener was active and got removed.
*/
public boolean removeListener(OutgoingChatMessageListener listener) {
return outgoingListeners.remove(listener);
}
/**
* Remove an outgoing chat message listener.
*
* @param listener the listener to remove.
* @return <code>true</code> if the listener was active and got removed.
* @deprecated use {@link #removeListener(OutgoingChatMessageListener)} instead.
*/
@Deprecated
public boolean removeOutoingLIstener(OutgoingChatMessageListener listener) {
return removeListener(listener);
}
/**
* Start a new or retrieve the existing chat with <code>jid</code>.
*