|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectaigames.soccer.application.SoccerApp
| Constructor Summary | |
SoccerApp()
|
|
| Method Summary | |
void |
configure(java.util.Properties configuration,
boolean isUnique)
Configures instance of Application with given parameters. |
void |
receiveMessage(UserId userId,
org.dom4j.Document messageDoc)
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 |
run()
|
void |
setServer(Server serverToSet)
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 class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public SoccerApp()
| Method Detail |
public void configure(java.util.Properties configuration,
boolean isUnique)
throws ConfigurationException
Application
configure in interface Applicationconfiguration - Configuration which will be used.isUnique - True if application is uniqe.
ConfigurationException - Thrown when configuration is malformed
or cannot be used for some reason.Application.configure(Properties, boolean)public void setServer(Server serverToSet)
Application
setServer in interface ApplicationserverToSet - Server instance.Application.setServer(snifos.server.Server)
public void unregisterUser(UserId userId)
throws InvalidUserException
Application
unregisterUser in interface ApplicationuserId - Id of user.
InvalidUserException - Thrown when problem
with deregistering occurs.Application.unregisterUser(snifos.common.UserId)
public void receiveMessage(UserId userId,
org.dom4j.Document messageDoc)
throws InvalidUserException
Application
receiveMessage in interface ApplicationuserId - Id of user which sends message.messageDoc - Received message.
InvalidUserException - Thrown when user id is invalid.Application.receiveMessage(snifos.common.UserId, org.dom4j.Document)public void run()
run in interface java.lang.RunnableRunnable.run()
public void registerUser(UserId userId,
org.dom4j.Document message)
throws InvalidUserException
Application
registerUser in interface ApplicationuserId - 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 instanceApplication.registerUser(UserId, Document)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||