Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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.

Field Summary
`long` | `_avgApp`
`long` | `_avgCometd`
`long` | `_avgInfra`
`long` | `_avgRoundTrip`
`org.cometd.Client` | `_client`
`long` | `_id`
`long` | `_maxApp`
`long` | `_maxCometd`
`long` | `_maxInfra`
`long` | `_maxRoundTrip`
`long` | `_minApp`
`long` | `_minCometd`
`long` | `_minInfra`
`long` | `_minRoundTrip`
`org.cometd.Message` | `_probeMessage`
`long` | `_samples`
`long` | `_timeout`
`long` | `_totalApp`
`long` | `_totalCometd`
`long` | `_totalInfra`
`long` | `_totalRoundTrip`

Constructor Summary
`StatisticsExtension.Statistic(org.cometd.Client client, long timeout)`

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`

Field Detail

### _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

Constructor Detail

### StatisticsExtension.Statistic

    public StatisticsExtension.Statistic(org.cometd.Client client,
                                         long timeout)

Method Detail

### 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()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 1995-2010 Mort Bay Consulting. All Rights Reserved.