I am trying to make Simple Openfire plugin.I have an ArrayList of usersnames which are phone numbers, i want all the registered users from it.The ArrayList want to send the ArrayList to server by json throung get or post method ,But i donot know how my plugin can listen for that request and respond to that user.
相关问题
- Get Offline Messages From XMPP Without Becoming On
- GCM using smack library NoResponseException: No re
- How to implement “last seen at” functionality (lik
- smack api get all public rooms on openfire server
- ejabberd MUC message history
相关文章
- Xmpp chat invisible presence
- Jabber.net on Unity/Android error (No JNI_OnLoad f
- Sending inline images using Smack XMPP
-
How to join multiple rooms by just sending one
- How to get offline message of group chat from Open
- XMPP events on Android
- How to create an account from Smack 4.1
- XMPPFramework - Upload Profile or Avatar Image
For your specific requirement you should check Openfire Rest-API Plugin.
The plugin already provides Users related operations over HTTP, like: Get overview over all or specific user and to create, update or delete a user.
So you can request all registered users in Openfire or You can query for a specific user if it's already registered or not. And it also supports authentication so your http endpoints will be secure.
Examples:
GET http://example.org:9090/plugins/restapi/v1/users
GET http://example.org:9090/plugins/restapi/v1/users?search=testuser
GET http://example.org:9090/plugins/restapi/v1/users/testuser
Regarding new plugin development, I would suggest you to start with Rest-API, it's already opensource, you can checkout the code and customize it as per your business needs or you can use it to develop your own plugin following it's project structure.
There is also a client library available as Rest-API Client.