powered by Jive Software

PacketCollector

Hi all,

I’'d wish to use a PacketCollector instead of a PacketListener, because it seems to be more suitable to manage GUI updating: i mean, it seems to allow to wait for operations dedicated to update GUI are finished before doing operations on the next packet (is it right?)

Then, I’'ve searched in javadoc about how to create a PacketCollector:

PacketCollector(org.jivesoftware.smack.PacketReader packetReader, PacketFilter packetFilter)[/i]

I did not managed how to create a PacketReader object…

Could some one help me please??

thx

Alex

The method you want to use is:

XMPPConnection#createPacketCollector(filter);

Hope that helps,

Alex

Hi Alex,

It’'s very helpful…thx

I did not manage to find an example of code using a packet collector (documentation tells “you shoud do something with the packet collector…”, and then does not tell how…)

Do you know where I can find code snippet?

thx

Alex