|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectsnifos.server.SnifosServer
Reference implementation of SNIFOS server interface.
| Constructor Summary | |
SnifosServer(java.io.InputStream configurationStream)
Server constructor. |
|
| Method Summary | |
void |
disconnectUser(UserId userId)
Disconnects user with given id from server. |
boolean |
isWait()
Method for unit test purposes only. |
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)
Called by application to send message to user. |
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 SnifosServer(java.io.InputStream configurationStream)
throws ConfigurationException
configurationStream - Stream from which server configurtion
will be loaded.
ConfigurationException - Thrown when configuratin is wrong.| Method Detail |
public boolean isWait()
public void sendMessage(UserId userId,
org.dom4j.Document message)
Server
sendMessage in interface ServeruserId - Id of user which should receive message.message - Message to be sent.Server.sendMessage(snifos.common.UserId, org.dom4j.Document)
public void receiveMessage(UserId userId,
org.dom4j.Document message)
throws ConfigurationException,
InvalidUserException
Server
receiveMessage in interface ServeruserId - Id of user which sends message.message - Received message.
InvalidUserException - Thrown when user id is invalid.
ConfigurationException - Thrown when application instance with
default configuration is created and the configuration is invalid.Server.receiveMessage(UserId, Document)public void disconnectUser(UserId userId)
Server
disconnectUser in interface ServeruserId - Id of the user.Server.disconnectUser(UserId)public void unregisterUser(UserId userId)
Server
unregisterUser in interface ServeruserId - Id of the user.Server.unregisterUser(UserId)public void run()
run in interface java.lang.RunnableRunnable.run()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||