public class PingRequestHandler extends Object implements RequestHandler
ping
command. It simply returns
OK if the command is ping
. Otherwise it returns
FAILED Unhandled command: <cmd>
.Constructor and Description |
---|
PingRequestHandler(Agent agent)
Create a new handler for the ping command.
|
public PingRequestHandler(Agent agent)
agent
- The agentpublic String handleCmd(Socket incoming, String cmd)
RequestHandler
handleCmd
in interface RequestHandler
incoming
- The socket that is handling the communication with the
remote clientcmd
- The commandcmd=ping