|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.altlinux.jabbix.JabbixRequest
public class JabbixRequest
A task object that is used to asynchronously query the value of a metric.
Constructor Summary | |
---|---|
JabbixRequest(AgentServer srv,
Socket sock)
Creates a request task object with the specified parametres. |
Method Summary | |
---|---|
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(String cmd)
Sets the command to be processed by this request. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JabbixRequest(AgentServer srv, 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 toMethod Detail |
---|
public boolean isParsed()
run()
public String getCommand()
public void setCommand(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 Runnable
RuntimeException
- if there was an exception during the request-response processisParsed()
,
getCommand()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |