|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectServer
public class Server
Represents a Java Messenger server.
Constructor Summary | |
---|---|
Server()
Constructs a new server. |
Method Summary | |
---|---|
int |
addUser(java.lang.String name,
java.lang.String password)
Tries to register a new user with a given screen name and password. |
int |
login(java.lang.String name,
java.lang.String password)
Tries to login a user with a given screen name and password. |
void |
logout(MsgUser u)
Removes a given user u from the set of all logged-in users. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Server()
Method Detail |
---|
public int addUser(java.lang.String name, java.lang.String password)
user
object
for this user and adds this user to the map of all users
(using the screen name as the key).
addUser
in interface Login
name
- the screen name of the user.password
- the password for the user.
public int login(java.lang.String name, java.lang.String password)
openDialog()
method;
login
in interface Login
name
- the screen name of the user.password
- the password for the user.
public void logout(MsgUser u)
u
from the set of all logged-in users.
Removes u
from the buddy list of each logged-in user.
u
- user to be logged out.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |