|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object snifos.server.test.DummyServer
Dummy implementation of server interface.
Constructor Summary | |
DummyServer()
|
Method Summary | |
void |
disconnectUser(UserId userId)
Disconnects user with given id from server. |
org.dom4j.Document |
getMessage()
Returns last message which was passed to send message method. |
UserId |
getUserId()
Returns last user id which was passed to send message method. |
void |
receiveMessage(UserId userId,
org.dom4j.Document message)
Called by communication module to pass message from user to appropriate application. |
void |
run()
|
void |
sendMessage(UserId userId,
org.dom4j.Document message)
Just stores the message and user id inside the server. |
void |
unregisterUser(UserId userId)
Unregisters user with given id from server application. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DummyServer()
Method Detail |
public org.dom4j.Document getMessage()
public UserId getUserId()
public void sendMessage(UserId userId, org.dom4j.Document message)
sendMessage
in interface Server
userId
- Id of user which should receive message.message
- Message to be sent.Server.sendMessage(UserId, Document)
public void receiveMessage(UserId userId, org.dom4j.Document message)
Server
receiveMessage
in interface Server
userId
- Id of user which sends message.message
- Received message.Server.receiveMessage(UserId, Document)
public void disconnectUser(UserId userId)
Server
disconnectUser
in interface Server
userId
- Id of the user.Server.disconnectUser(UserId)
public void run()
run
in interface java.lang.Runnable
Runnable.run()
public void unregisterUser(UserId userId)
Server
unregisterUser
in interface Server
userId
- Id of the user.Server.unregisterUser(UserId)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |