Using IQHandlers in plugin components

Hi, I’‘m taking a look at the internals of wildfire in order to write some plugins. One of my goals is to handle ad-hoc commands in components, and I’‘m wondering if it is possible to reuse the AdHocCommandsHandlers and the other handlers defined in the server. As far as I’‘ve seen all the other plugins directly handle disco packets and other iqs, without using them. Is it beacuse it’'s impossible, or because the implementation is so easy that nobody bodered to use them?

If it is possibile to use them, how can I connect them with the packet processing of the incoming packets? Is there any example around?

Thanks

Ciao Fabio,

Ad-hoc commands was designed with the goal to be reused by components. As you noticed it is up to each component to decide how IQ packets are going to be handled. If you need to handle ad-hoc commands then you should be able to reuse the AdHocCommandManager and AdHocCommand classes. AdHocCommandHandler cannot be directly reused since it is specific for the server (i.e. not for components).

Regards,

– Gato

Ok, got it, thanks! This means that components should explicitely handle disco packets for the supported command, shouldn’'t they?

bye,

ff

Ciao Fabio,

You got it.

Regards,

– Gato