mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-22 20:12:07 +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.
|
* @param listener the listener to remove.
|
||||||
* @return <code>true</code> if the listener was active and got removed.
|
* @return <code>true</code> if the listener was active and got removed.
|
||||||
|
* @deprecated Use {@link #removeIncomingListener(IncomingChatMessageListener)} instead.
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
@SuppressWarnings("FunctionalInterfaceClash")
|
@SuppressWarnings("FunctionalInterfaceClash")
|
||||||
public boolean removeListener(IncomingChatMessageListener listener) {
|
public boolean removeListener(IncomingChatMessageListener listener) {
|
||||||
return incomingListeners.remove(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.
|
* Add a new listener for outgoing chat messages.
|
||||||
*
|
*
|
||||||
|
@ -252,9 +264,11 @@ public final class ChatManager extends Manager {
|
||||||
*
|
*
|
||||||
* @param listener the listener to remove.
|
* @param listener the listener to remove.
|
||||||
* @return <code>true</code> if the listener was active and got removed.
|
* @return <code>true</code> if the listener was active and got removed.
|
||||||
|
* @deprecated use {@link #removeOutgoingListener(OutgoingChatMessageListener)} instead.
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
public boolean removeListener(OutgoingChatMessageListener listener) {
|
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.
|
* @param listener the listener to remove.
|
||||||
* @return <code>true</code> if the listener was active and got removed.
|
* @return <code>true</code> if the listener was active and got removed.
|
||||||
* @deprecated use {@link #removeListener(OutgoingChatMessageListener)} instead.
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
public boolean removeOutgoingListener(OutgoingChatMessageListener listener) {
|
||||||
public boolean removeOutoingLIstener(OutgoingChatMessageListener listener) {
|
return outgoingListeners.remove(listener);
|
||||||
return removeListener(listener);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue