powered by Jive Software

Trying to get all connected nicknames


I would like to know if it’s possible to get all connected member nickname.

I can get all usernames, but I dont figured out to get all nicknames.

Thank you for your help.

Collection sessions = sessionManager.getSessions();

    List<String> result = new ArrayList<String>(sessions.size());
    for(ClientSession cs : sessions) {
        try {
        } catch (UserNotFoundException e) {

By memory I think you would have to then look up that user in the userManager and then getName() - or something close to that.

Let me know if you need more info.

public List getOnlineUsers() {
Collection users = userManager.getUsers();
List result = new ArrayList(users.size());
for (User u : users) {

    return result;   

Like that ?

Doesnt work, return firstname and lastname ; I would like to get all nicknames.