Session ID stored at the server?

Hi,

I am running the spark client with the openfire server.

Please let me know if the openfire server keeps track of the sessions in progress via a session id or something else. If yes, where is this information saved?

Also let me know if the creation of groups using the spark client can be restricted to the server side (openfire server). If so, how can this be done?

Shweta

Hey Shweta,

priyadarshi_shweta wrote:

I am running the spark client with the openfire server.

Please let me know if the openfire server keeps track of the sessions in progress via a session id or something else. If yes, where is this information saved?

You can use SessionManager#getSessions() to get sessions of users that have authenticated with the server.

Also let me know if the creation of groups using the spark client can be restricted to the server side (openfire server). If so, how can this be done?

This feature is not supported by Openfire (yet). You can implement it by adding a PacketInterceptor that would reject when a client tries to change his roster.

Regards,

– Gato

Hi Gato,

I just checked the SessionManager class but I am unable to find any method like getSessions() to get sessions of users that have authenticated with the server.

Please let me know how to proceed in the matter.

Shweta

Hey Shweta,

The file wildfire\src\java\org\jivesoftware\wildfire\SessionManager.java in the line 1029 has the following code:

/**
     * Returns a list that contains all client sessions connected to the server. The list
     * contains sessions of anonymous and non-anonymous users.
     *
     * @return a list that contains all client sessions connected to the server.
     */
    public Collection<ClientSession> getSessions() {
        List<ClientSession> allSessions = new ArrayList<ClientSession>();
        copyAllUserSessions(allSessions);
        copyAnonSessions(allSessions);
        return allSessions;
    }

Regards,

– Gato