public class JabbixRequest
extends java.lang.Object
implements java.lang.Runnable
| Constructor and Description |
|---|
JabbixRequest(AgentServer srv,
java.net.Socket sock)
Creates a request task object with the specified parametres.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getCommand()
Returns the command that is set to be processed.
|
boolean |
isParsed()
Indicates if the request is parsed.
|
void |
run()
Starts the request process.
|
void |
setCommand(java.lang.String cmd)
Sets the command to be processed by this request.
|
public JabbixRequest(AgentServer srv, java.net.Socket sock)
srv - a metric agent server using to get the suitable metric
agent for a key being requestedsock - a connected socket to read the request data from and send the
retrieved metric value topublic boolean isParsed()
run()public java.lang.String getCommand()
public void setCommand(java.lang.String cmd)
cmd - a command to setrun()public void run()
parsed and
command properties are set. Then the
command is processed. If it is identified as a metric key then a
metric agent is requested from the agent server and the fresh
metric value is retrieved from it. The new metric value is then sent to
the requester as a data response.run in interface java.lang.Runnablejava.lang.RuntimeException - if there was an exception during the request-response processisParsed(),
getCommand()