powered by Jive Software

How to realize "Delayed packet delivery"?

Hello everyone,

I want room-leave-packets (presence packets) not being instantly delivered to all room participants of a MUC if any participant leaves the room. Instead I want to wait x seconds whether the user comes back again or not. In case he does not re-enter the room that room-leave-packet should be delivered. I know HOW to realize this functionality but can you tell me WHERE do I need to integrate my plugin’s classes and which class types do I have to use therefore? Using a PacketIntercepter is not enough since it only can manipulate the packets but does not prevent them from being sent to the clients. Which Openfire (plugin) classes have the opportunity to stop packets from being delivered?

Thanks in advance for your suggestions!

Lars

Ah, I saw that I can use a PacketInterceptor to prevent packets from being sent. I need to throw a PacketRejectedException when “processed” parameter of method “interceptPacket” is still “false”. So the first part of my question is answered.

But how can I resend the packet. To which method do I have to pass the packets that I have collected and now really want to send since the user did not came back?