mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-10 09:39:39 +02:00
Improve MUC message and presence listeners
instead of using a PacketListener, which means that the user has to downcast the Packet to Message, we now use a Listener which callback parameter is already Message/Presence. It is necessary to introduce MessageListener and PresenceListener, which are interfaces that have a callback for Message/Presence instead of Packet. The 'old' MessageListener is renamed to ChatMessageListener. Use Generics in ConnectionDetachedPacketCollector.
This commit is contained in:
parent
38582eed84
commit
e835df5641
13 changed files with 178 additions and 65 deletions
|
@ -386,7 +386,7 @@ public class ChatConnectionTest {
|
|||
|
||||
class TestChatManagerListener implements ChatManagerListener {
|
||||
private Chat newChat;
|
||||
private MessageListener listener;
|
||||
private ChatMessageListener listener;
|
||||
|
||||
public TestChatManagerListener(TestMessageListener msgListener) {
|
||||
listener = msgListener;
|
||||
|
@ -423,7 +423,7 @@ public class ChatConnectionTest {
|
|||
}
|
||||
}
|
||||
|
||||
private class TestMessageListener implements MessageListener {
|
||||
private class TestMessageListener implements ChatMessageListener {
|
||||
private Chat msgChat;
|
||||
private int counter = 0;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue