Commit Graph

5 Commits

Author SHA1 Message Date
Florian Schmaus ff8720698a Change muc.InvitationListner to use the MUC instance 2014-12-30 01:30:13 +01:00
Florian Schmaus 252d5172e9 Return more specific types (e.g. Collection → List)
be generic as possible in what you accept, but more specific in what you
return.

Also tweak MultiuserChatManager methods a bit.
2014-11-29 13:41:49 +01:00
Florian Schmaus 6a2bc0c02d Fix MUC invitationPacketListener ClassCastException
Make sure that the Packets are of type Message. To prevent:

E/AbstractXMPPConnection﹕ Exception in packet listener
    java.lang.ClassCastException: org.jivesoftware.smack.packet.Presence cannot be cast to org.jivesoftware.smack.packet.Message
            at org.jivesoftware.smackx.muc.MultiUserChatManager$2.processPacket(MultiUserChatM anager.java:124)
            at org.jivesoftware.smack.AbstractXMPPConnection.notifiyReceivedListeners(Abstract XMPPConnection.java:854)
            at org.jivesoftware.smack.AbstractXMPPConnection$ListenerNotification.run(Abstract XMPPConnection.java:876)
            at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:390)
            at java.util.concurrent.FutureTask.run(FutureTask.java:234)
            at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201 (ScheduledThreadPoolExecutor.java:153)
            at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Schedu ledThreadPoolExecutor.java:267)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
            at java.lang.Thread.run(Thread.java:856)
2014-10-21 10:38:01 +02:00
Florian Schmaus 47e327f2e6 Fix NPE in MultiUserChatManager.getMultiUserchat()
Since the HashMap has WeakReferences as values, there are two levels at
which values could be null.
2014-10-20 21:12:51 +02:00
Florian Schmaus b54d133b36 Add MultiUserChatManager
apply the Manager pattern to 'muc'. This prevents the user creating
multiple MultiUserChat instances for the same MUC.

Move the static method from MultiUserChat to MultiUserChatManager.

Also add AbstractNodeInformationProvider.
2014-10-13 22:32:34 +02:00