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

## com.sun.appserv.management.j2ee.statistics
Class StatsImpl

    java.lang.Object
      com.sun.appserv.management.j2ee.statistics.GetterInvocationHandler
          com.sun.appserv.management.j2ee.statistics.MapGetterInvocationHandler
              com.sun.appserv.management.j2ee.statistics.StatsImpl

All Implemented Interfaces:
  java.lang.reflect.InvocationHandler, java.io.Serializable, Stats

public class StatsImpl
extends MapGetterInvocationHandler
implements Stats, java.io.Serializable

Generic implementation of Stats based on either a Map or a `CompositeData`. There are two ways to implement a specific type of Stats object:

- The subclass extends this base class, using getValue() to fetch the requested value from the Map maintained by this class.
- Create a proxy implementing the desired Stats subclass interface and use an instance of this class as the `InvocationHandler`.

In addition to the standard JSR 77 Stats interfaces, the following specific Stats interfaces are available:

- `AltJDBCConnectionPoolStats`
- `AltServletStats`
- `ConnectionManagerStats`
- `ConnectionPoolStats`
- `ConnectorConnectionPoolStats`
- `DNSStats`
- `EJBCacheStats`
- `EJBMethodStats`
- `EJBPoolStats`
- `FileCacheStats`
- `HTTPListenerStats`
- `HTTPServiceVirtualServerStats`
- `KeepAliveStats`
- `NativeWebCoreThreadPoolStats`
- `NativeWebCoreVirtualServerRequestStats`
- `ThreadPoolStats`
- `TransactionServiceStats`
- `WebModuleVirtualServerStats`

See Also:
  Serialized Form

Constructor Summary
`StatsImpl(CompositeData compositeData)` Create a Stats from a CompositeData, whose keys are the Statistic names and whose values are CompositeData for the Statistic.
`StatsImpl(java.util.Map statisticsIn)` Create a Stats from a Map, whose keys are the Statistic names and whose values are the Statistics.
`StatsImpl(Statistic[] statistics)`

Method Summary
`boolean` | `equals(java.lang.Object rhs)`
`Statistic` | `getStatistic(java.lang.String statisticName)` Get a Statistic by name.
`java.lang.String[]` | `getStatisticNames()` Returns an array of Strings which are the names of the attributes from the specific Stats submodel that this object supports.
`Statistic[]` | `getStatistics()` Returns an array containing all of the Statistic objects supported by this Stats object.
`java.lang.Object` | `invoke(java.lang.Object myProxy, java.lang.reflect.Method method, java.lang.Object[] args)`
`java.lang.String` | `toString()`

Methods inherited from class com.sun.appserv.management.j2ee.statistics.MapGetterInvocationHandler
`containsValue, getMap, getValue`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### StatsImpl

    public StatsImpl(CompositeData compositeData)

  Create a Stats from a CompositeData, whose keys are the Statistic names and whose values are CompositeData for the Statistic.

### StatsImpl

    public StatsImpl(java.util.Map statisticsIn)

  Create a Stats from a Map, whose keys are the Statistic names and whose values are the Statistics.

### StatsImpl

    public StatsImpl(Statistic[] statistics)

Method Detail

### getStatistic

    public Statistic getStatistic(java.lang.String statisticName)

  Description copied from interface: `Stats`
  Get a Statistic by name.

  Specified by:
    `getStatistic` in interface `Stats`

### getStatisticNames

    public java.lang.String[] getStatisticNames()

  Description copied from interface: `Stats`
  Returns an array of Strings which are the names of the attributes from the specific Stats submodel that this object supports. Attributes named in the list must correspond to attributes that will return a Statistic object of the appropriate type which contains valid performance data. The return value of attributes in the Stats submodel that are not included in the statisticNames list must be null. For each name in the statisticNames list there must be one Statistic with the same name in the statistics list.

  Specified by:
    `getStatisticNames` in interface `Stats`

### getStatistics

    public Statistic[] getStatistics()

  Description copied from interface: `Stats`
  Returns an array containing all of the Statistic objects supported by this Stats object.

  Specified by:
    `getStatistics` in interface `Stats`

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `MapGetterInvocationHandler`

### equals

    public boolean equals(java.lang.Object rhs)

  Overrides:
    `equals` in class `MapGetterInvocationHandler`

### invoke

    public java.lang.Object invoke(java.lang.Object myProxy,
                                   java.lang.reflect.Method method,
                                   java.lang.Object[] args)
                            throws java.lang.Throwable

  Specified by:
    `invoke` in interface `java.lang.reflect.InvocationHandler`
  Overrides:
    `invoke` in class `GetterInvocationHandler`
  Throws:
    `java.lang.Throwable`

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

Submit a bug or feature

Copyright 2003 Sun Microsystems, Inc. All rights reserved.