org.mortbay.cometd.ext
Class StatisticsExtension.Statistic
java.lang.Object
java.util.TimerTask
org.mortbay.cometd.ext.StatisticsExtension.Statistic
- All Implemented Interfaces:
- java.lang.Runnable
- Enclosing class:
- StatisticsExtension
public class StatisticsExtension.Statistic
- extends java.util.TimerTask
Statistic
One measurement of min,max and average roundtrip time of a cometd message to all clients.
Method Summary |
java.lang.String |
getEndText()
|
java.lang.String |
getStartText()
|
void |
notifyEnd(org.cometd.Client client,
StatisticsExtension.Statistic stat)
Send a message to the originator of the statistics request to advise of the
results. |
void |
notifyStart()
Send a message to the originator of the statistics request to advise
that it is underway. |
void |
run()
Timer expiry: send off the samples we have gathered for this instance |
void |
sample(long reqTime,
long sentTime,
long rcvTime,
long lag)
|
void |
setProbe(org.cometd.Message probe)
|
java.lang.String |
toString()
|
Methods inherited from class java.util.TimerTask |
cancel, scheduledExecutionTime |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
_id
public long _id
_client
public org.cometd.Client _client
_probeMessage
public org.cometd.Message _probeMessage
_timeout
public long _timeout
_samples
public long _samples
_minRoundTrip
public long _minRoundTrip
_maxRoundTrip
public long _maxRoundTrip
_avgRoundTrip
public long _avgRoundTrip
_totalRoundTrip
public long _totalRoundTrip
_minApp
public long _minApp
_maxApp
public long _maxApp
_avgApp
public long _avgApp
_totalApp
public long _totalApp
_minInfra
public long _minInfra
_maxInfra
public long _maxInfra
_avgInfra
public long _avgInfra
_totalInfra
public long _totalInfra
_minCometd
public long _minCometd
_maxCometd
public long _maxCometd
_avgCometd
public long _avgCometd
_totalCometd
public long _totalCometd
StatisticsExtension.Statistic
public StatisticsExtension.Statistic(org.cometd.Client client,
long timeout)
setProbe
public void setProbe(org.cometd.Message probe)
sample
public void sample(long reqTime,
long sentTime,
long rcvTime,
long lag)
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
run
public void run()
- Timer expiry: send off the samples we have gathered for this instance
- Specified by:
run
in interface java.lang.Runnable
- Specified by:
run
in class java.util.TimerTask
- See Also:
TimerTask.run()
notifyStart
public void notifyStart()
- Send a message to the originator of the statistics request to advise
that it is underway.
The message will be sent on the same channel as the probe message.
getStartText
public java.lang.String getStartText()
notifyEnd
public void notifyEnd(org.cometd.Client client,
StatisticsExtension.Statistic stat)
- Send a message to the originator of the statistics request to advise of the
results.
The message will include all data from the original message from the originator,
just with the _markerKey field modified.
getEndText
public java.lang.String getEndText()
Copyright © 1995-2010 Mort Bay Consulting. All Rights Reserved.