Class DefaultRequestHandler
java.lang.Object
net.sf.basedb.clients.jobagent.handlers.DefaultRequestHandler
- All Implemented Interfaces:
RequestHandler
This is the default request handler for incoming requests to
a job agent. It registeres implementations for the following commands:
- ping:
PingRequestHandler
. - info, status:
InfoRequestHandler
. - start:
StartRequestHandler
. - stop:
StopRequestHandler
. - pause:
PauseRequestHandler
.
- Version:
- 2.0
- Author:
- nicklas
- Last modified
- $Date: 2014-04-09 14:21:20 +0200 (on, 09 apr 2014) $
-
Field Summary
Modifier and TypeFieldDescriptionprivate final Agent
private final Map<String,
RequestHandler> private static final Logger
Log job agent events. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionHandle a command that was sent by an incoming request.void
registerHandler
(RequestHandler handler, String... cmds)
-
Field Details
-
log
Log job agent events. -
agent
-
commandHandlers
-
-
Constructor Details
-
DefaultRequestHandler
-
-
Method Details
-
registerHandler
-
handleCmd
Description copied from interface:RequestHandler
Handle a command that was sent by an incoming request.- Specified by:
handleCmd
in interfaceRequestHandler
- Parameters:
incoming
- The socket that is handling the communication with the remote clientcmd
- The command- Returns:
- The answer
-