|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.limegroup.gnutella.security.UserManager
Manages the user authentication data Note: Implements Singleton Design Pattern Note: The methods in this class are synchronized, as different processes may be accessing same instance. And so the process using this class doesnt have enough information to figure out when to synchronize.
Method Summary | |
java.lang.String[] |
getAllUsers()
Returns all the users |
User |
getUser(java.lang.String username)
Returns the user data corresponding to the given username |
static UserManager |
instance()
Returns an instance of UserManager Note: Implements Singleton Design Pattern |
static void |
main(java.lang.String[] args)
|
void |
putUser(User user)
Adds the passed user to the list of users. |
void |
removeUser(java.lang.String username)
Removes the user data corresponding to the given username |
void |
save()
Saves the user map to file |
java.lang.String |
toString()
returns the string representation of the contents |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
public static UserManager instance()
public User getUser(java.lang.String username)
username
- Unique name identifying the user, whose information
is requested.
public void putUser(User user)
user
- The user to be addedpublic java.lang.String[] getAllUsers()
public void removeUser(java.lang.String username)
username
- Unique name identifying the user, who has to
be deleted.public void save()
public java.lang.String toString()
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |