Hi there,
at our company over the years we have developed several plugins to give us Push functionality, Room and group management, translating system events to readable information and the like.
Sometimes, what was required was external access, and this we managed by exposing servlets, sometimes, XMPP clients required the services and we exposed IQHandlers or registered Interceptors.
But, for example, one of my latest developments was a functionality to allow web clients to quickly request the last message for each of their contacts in a single shot, and yes, I know, they could have fired off a MAM request for each contact, but that takes time and network.
This is of course a small missing functionality in XEP 313 and Iâm not asking for the Monitoring plugin to go against the spec. and I wanted the resulting messages to fly off in good mam:1 fashion not to make any parsing changes client side. So I thought it out and determined I had two options.
- was to manually query the archive with another plugin using similar queries to what the monitoring plugin uses.
- Was to use the pluginmanager and reflection to invoke the MonitoringPlugin findMessages function and get the result.
This got me thinking though that both are rather fragile approaches, what if a new version of the monitoring plugin changes the table model? What if the plugin is updated and breaks the functionality that I am accessing through reflection?
So, given it would be beneficial for us, to be able to expose specific functionality across plugins without having to bother the network stack, is there a recommended approach? Is there a service container in use that I am unaware of, or could it be an interesting feature to add to openfire?
As usual, all suggestions and comments are welcome,
Paolo Manili