| java.lang.Object echo2example.chatserver.UserManager
UserManager | public class UserManager (Code) | | A store of active users.
|
Method Summary | |
public String | add(String userName) Attempts to add a new user. | public boolean | authenticate(String userName, String authToken) Authenticates a user based on user name and an authentication token. | public void | purge() Performs clean-up operations, i.e., removing stale users. | public void | remove(String userName) Removes the specified user. | public String | toString() |
add | public String add(String userName)(Code) | | Attempts to add a new user.
Parameters: userName - the name of the user an authentication token, if the user name is available or null if it is not |
authenticate | public boolean authenticate(String userName, String authToken)(Code) | | Authenticates a user based on user name and an authentication token.
Parameters: userName - the user's name Parameters: authToken - the authentication token true if the user is authenticated |
purge | public void purge()(Code) | | Performs clean-up operations, i.e., removing stale users.
|
remove | public void remove(String userName)(Code) | | Removes the specified user.
Parameters: userName - the user's name |
|
|