|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object aigames.soccer.communication.SocketCommModule
The socket communication module class.
Constructor Summary | |
SocketCommModule()
Default constructor. |
Method Summary | |
void |
configure(java.util.Properties configuration,
int commModuleId)
Configures instance of CommModule with given parameters. |
void |
disconnectUser(UserId userId)
Disconnects given user from a module. |
void |
run()
|
void |
sendMessage(UserId userId,
org.dom4j.Document message)
Called by server to send message to user. |
void |
setServer(Server server)
Sets instance of server which will be used to pass messages to applications. |
void |
setTest(boolean b)
Setter for test property. |
void |
shutdown()
Stops communication module. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SocketCommModule()
Method Detail |
public void configure(java.util.Properties configuration, int commModuleId)
CommModule
configure
in interface CommModule
configuration
- Configuration which will be used.commModuleId
- Id of this instance of communication module
inside the server - it is necessary to create valid user id.CommModule.configure(java.util.Properties, int)
public void setServer(Server server)
CommModule
setServer
in interface CommModule
server
- Server instance.CommModule.setServer(snifos.server.Server)
public void sendMessage(UserId userId, org.dom4j.Document message) throws InvalidUserException
CommModule
sendMessage
in interface CommModule
userId
- Id of user which should receive message.message
- Message to be sent.
InvalidUserException
- Thrown when user id is invalid for this
communication module instance.CommModule.sendMessage(snifos.common.UserId, org.dom4j.Document)
public void disconnectUser(UserId userId)
CommModule
disconnectUser
in interface CommModule
userId
- User id.CommModule.disconnectUser(snifos.common.UserId)
public void shutdown()
CommModule
shutdown
in interface CommModule
CommModule.shutdown()
public void run()
run
in interface java.lang.Runnable
Runnable.run()
public void setTest(boolean b)
b
-
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |