Fetching session information from the server

Hi,

I am running the Spark client with the Wildfire server.

But if I write java code with the help of spark api, how can I get session, user and other information from the Wildfire server?? How do I bridge the gap between the two??

Shweta

Hi Shweta,

Openfire supports ad-hoc commands which you may send as an admin via xmpp to your server. I have no idee if Smack supports this using an API or if you need to build the xmpp packets “manually”.

LG

Kindly answer to the question only.

I intend to fetch the session information from the Wildfire server using the spark api.

How can that be done???

I tried out this way:

SessionManager sm = SparkManager.getSessionManager();

System.out.println( sm.getServerAddress() );

System.out.println( sm.getUsername() );

But both return null though the Wildfire server is up and the spark client is running.

Shweta

Hi,

I guess that this code fragment is brand new and still under developmentor Openfire is still missing support for this. You could try to get the list manually as described in http://www.xmpp.org/extensions/xep-0133.html#get-online-users-list

LG

Hi,

Also let me know how to fetch the messages received by a user (both users being specified in the java application) and get them printed on the console using a java based application.

Shweta