mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-25 15:52:06 +01:00
Deprecate some chat2 ChatManager APIs
because their functional interfaces clashes. This helps to prepare Smack for Java 8 where such a construct results in a compile time error.
This commit is contained in:
parent
6dfc20ee5e
commit
278c15d52d
1 changed files with 17 additions and 5 deletions
|
@ -218,12 +218,24 @@ public final class ChatManager extends Manager {
|
|||
*
|
||||
* @param listener the listener to remove.
|
||||
* @return <code>true</code> if the listener was active and got removed.
|
||||
* @deprecated Use {@link #removeIncomingListener(IncomingChatMessageListener)} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
@SuppressWarnings("FunctionalInterfaceClash")
|
||||
public boolean removeListener(IncomingChatMessageListener listener) {
|
||||
return incomingListeners.remove(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.
|
||||
*/
|
||||
public boolean removeIncomingListener(IncomingChatMessageListener listener) {
|
||||
return incomingListeners.remove(listener);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a new listener for outgoing chat messages.
|
||||
*
|
||||
|
@ -252,9 +264,11 @@ public final class ChatManager extends Manager {
|
|||
*
|
||||
* @param listener the listener to remove.
|
||||
* @return <code>true</code> if the listener was active and got removed.
|
||||
* @deprecated use {@link #removeOutgoingListener(OutgoingChatMessageListener)} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public boolean removeListener(OutgoingChatMessageListener listener) {
|
||||
return outgoingListeners.remove(listener);
|
||||
return removeOutgoingListener(listener);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -262,11 +276,9 @@ public final class ChatManager extends Manager {
|
|||
*
|
||||
* @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);
|
||||
public boolean removeOutgoingListener(OutgoingChatMessageListener listener) {
|
||||
return outgoingListeners.remove(listener);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue