|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.altlinux.jabbix.MetricRequest<M>
M - public class MetricRequest<M extends JabbixMetric<?>>
A task object encapsulating the process of the metric value retrieval using a metric agent both synchronously and asynchronously.
| Constructor Summary | |
|---|---|
MetricRequest(AgentServer agentServer,
M metric,
MetricTable<M> table)
Constructs a metric request task object with the specified parameters. |
|
| Method Summary | |
|---|---|
JabbixMetric<?> |
getFreshMetric()
Returns a new metric instance with the fresh value for the metric specified on the request construction. |
void |
run()
Used to retrieve and update the metric value asynchronously. |
void |
setAgentServer(AgentServer agentServer)
Sets the metric agent server to query for new values. |
void |
updateMetric(M metric)
Updates the value of the given metric making a request to the suitable metric agent. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MetricRequest(AgentServer agentServer,
M metric,
MetricTable<M> table)
agentServer - a metric agent server using to get the suitable metric
agent for a metric being requestedmetric - a metric to retrieve a fresh value fortable - an optional metric table object to pass the updated metric
object to| Method Detail |
|---|
public void run()
run in interface Runnable
public JabbixMetric<?> getFreshMetric()
throws JabbixException,
NoSuchMetricException
JabbixException - on the exception case during the value retrieval
NoSuchMetricException - if a metric agent for the specified metric is not found
public void updateMetric(M metric)
throws JabbixException,
NoSuchMetricException
metric - a metric to update
JabbixException - on the exception case during the value retrieval
NoSuchMetricException - if a metric agent for the specified metric is not foundpublic void setAgentServer(AgentServer agentServer)
agentServer - a metric agent server
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||