|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface describes main application class for applications designed for SNIFOS application server.
Method Summary | |
void |
configure(java.util.Properties configuration,
boolean isUnique)
Configures instance of Application with given parameters. |
void |
receiveMessage(UserId userId,
org.dom4j.Document message)
Called by server to pass message from user to this instance of application. |
void |
registerUser(UserId userId,
org.dom4j.Document message)
Registers user with given id. |
void |
setServer(Server server)
Sets instance of server which will be used to communicate with to users. |
void |
unregisterUser(UserId userId)
Unregisters user with given id (for example after user disconnects). |
Methods inherited from interface java.lang.Runnable |
run |
Method Detail |
public void configure(java.util.Properties configuration, boolean isUnique) throws ConfigurationException
configuration
- Configuration which will be used.isUnique
- True if application is uniqe.
ConfigurationException
- Thrown when configuration is malformed
or cannot be used for some reason.public void setServer(Server server)
server
- Server instance.public void unregisterUser(UserId userId) throws InvalidUserException
userId
- Id of user.
InvalidUserException
- Thrown when problem
with deregistering occurs.public void registerUser(UserId userId, org.dom4j.Document message) throws InvalidUserException
userId
- Id of user to register.message
- First message sent by user (can contain some
user specific informations)
InvalidUserException
- Thrown when user cannot be registered
by given application instancepublic void receiveMessage(UserId userId, org.dom4j.Document message) throws InvalidUserException
userId
- Id of user which sends message.message
- Received message.
InvalidUserException
- Thrown when user id is invalid.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |