|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object snifos.communication.test.DummyCommModule
Dummy implementation of communication module. It just simulates connections from few users, sends dummy messages from them and checks if responses are the responses which were expected.
Constructor Summary | |
DummyCommModule()
|
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 |
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 DummyCommModule()
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(Properties, int)
public void setServer(Server server)
CommModule
setServer
in interface CommModule
server
- Server instance.CommModule.setServer(Server)
public void sendMessage(UserId userId, org.dom4j.Document message)
CommModule
sendMessage
in interface CommModule
userId
- Id of user which should receive message.message
- Message to be sent.CommModule.sendMessage(UserId, Document)
public void disconnectUser(UserId userId)
CommModule
disconnectUser
in interface CommModule
userId
- User id.CommModule.disconnectUser(UserId)
public void shutdown()
CommModule
shutdown
in interface CommModule
CommModule.shutdown()
public void run()
run
in interface java.lang.Runnable
Runnable.run()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |