Spring REST Template Client

If you want just a Spring (Async) REST Client, where you can set the timeout and ignore the SSL check, you can use follow helper class.

 

Primefaces – calling java method from javascript

If you want to call a java method from javascript you can do it with:

 

Openfire Bot / Listener Plugin Tutorial

If you want to create an openfire plugin which is listening for some packets / messages and should react based on message content e.g. Bot. Then you are right here. In my example plugin I want to listen for a message which contains packet extensions and parse the data from XML.

The message looks like:

And the Openfire Plugin code to log the data looks like this:

You can also download the whole plugin here: bot plugin

REST API Plugin for Openfire

In the meantime, I developed a new plugin for Openfire named “REST API”.
It combines all available plugins, which manage openfire over REST/HTTP, to provide consistent API.
REST API is made up of User Serivce and MUC Service plugins. Additionally the REST API provides some more features outside of named plugins. See the feature list:

  • Get overview over all or specific user and to create, update or delete a user
  • Get overview over all or specific group and to create, update or delete a group
  • Get overview over all user roster entries and to add, update or delete a roster entry
  • Add user to a group and remove a user from a group
  • Lockout, unlock or kick the user (enable / disable)
  • Get overview over all or specific system properties and to create, update or delete system property
  • Get overview over all or specific chat room and to create, update or delete a chat room
  • Get overview over all or specific user sessions
  • Send broadcast message to all online users

Link to the REST API documentation:
https://www.igniterealtime.org/projects/openfire/plugins/restapi/readme.html

Link to the plugins download site:
https://www.igniterealtime.org/projects/openfire/plugins.jsp