|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.catnets.p2pagent.api.P2pAgent
org.catnets.p2pagent.apiSamples.Echoes.EchoServer
public class EchoServer
Receives a message and replies to the originator with the same message, after waiting for a random time, wich simulates the server's response time.
| Constructor Summary | |
|---|---|
EchoServer()
|
|
| Method Summary | |
|---|---|
protected void |
execute()
Executes the sever main logic, that limits to read parameters. |
protected void |
handleEvent(org.catnets.p2pagent.api.Event event)
Handles the expiration of the event used to delay the response |
protected void |
handleMessage(org.catnets.p2pagent.api.AgentMessage message)
Handles a meesage from a client and prepares the response. |
| Methods inherited from class org.catnets.p2pagent.api.P2pAgent |
|---|
createAgent, done, done, error, forward, getAgentName, getAgentRefence, getBooleanArgument, getDoubleArgument, getIntArgument, getLongArgument, getObjectArgument, getStringArgument, getTransactionId, groupCast, groupCast, handleConnection, handleGroupCast, initialize, isArgumentsEmpty, joinGroup, log, logDebug, logError, logInfo, logWarning, reply, reportMetric, reportMetric, reportMetric, run, scheduleEvent, send, setBooleanResult, setDoubleResult, setIntgResult, setLongResult, setObjectResult, setStringResult, startTransaction, terminate |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EchoServer()
| Method Detail |
|---|
protected void execute()
execute in class org.catnets.p2pagent.api.P2pAgentprotected void handleMessage(org.catnets.p2pagent.api.AgentMessage message)
handleMessage in class org.catnets.p2pagent.api.P2pAgentprotected void handleEvent(org.catnets.p2pagent.api.Event event)
handleEvent in class org.catnets.p2pagent.api.P2pAgentevent - Event with the infomation of the event, including the
original message that must be replied.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||