amb

Custom Stream Management Callbacks

Discussion created by amb on Oct 10, 2014
Latest reply on Nov 6, 2014 by amb

Hi all, I'm happily using Smack 4.1alpha3 for an Android project but I'm running into an issue with stream management.

 

The XMPP server I'm working with requires some custom handling of stream management acks, but there doesn't seem to be a way in Smack to register a PacketListener on that packet type.

 

Is this something that can be added? I'm happy to pitch in and write a patch, but I want to ensure I move in the right direction with the full blessing of the community.

 

My approach would be to use the existing packet listener/collector/filter infrastructure, so have AckAnswer, AckRequest etc extend Packet (possible?), and then call processPacket() after processHandledCount() in the big switch statement within parsePackets().

 

Does that seem like a reasonable thing to do?

Outcomes