Java EE 5 SDK

com.sun.appserv.management.j2ee.statistics
Class StatisticFactory

java.lang.Object
  extended by com.sun.appserv.management.j2ee.statistics.StatisticFactory

public final class StatisticFactory
extends Object

Creates Statistic implementations based on CompositeData or Map.


Method Summary
static Statistic create(Class<? extends Statistic> theInterface, CompositeData data)
          Create a new Statistic using the specified CompositeData
static Statistic create(Class<? extends Statistic> theInterface, Map<String,?> mappings)
          Create a new Statistic using the specified map.
static Statistic create(CompositeData data)
          Create a new Statistic using the specified CompositeData.
static Class<? extends Statistic> getInterface(Statistic s)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

public static Statistic create(Class<? extends Statistic> theInterface,
                               CompositeData data)
Create a new Statistic using the specified CompositeData

Parameters:
theInterface - interface which the Statistic should implement, must extend Statistic

create

public static Statistic create(CompositeData data)
Create a new Statistic using the specified CompositeData. The CompositeType of data must be an appropriate Statistic class.


create

public static Statistic create(Class<? extends Statistic> theInterface,
                               Map<String,?> mappings)
Create a new Statistic using the specified map. The standard JSR 77 types are handled appropriately. Custom (non-standard) Statistics may also be used; in this case a proxy is returned which implements the interface specified by theClass.

Parameters:
theInterface - the interface which the resulting statistic implements
mappings - a Map containing keys of type String and their Object values

getInterface

public static Class<? extends Statistic> getInterface(Statistic s)

Java EE 5 SDK

Submit a bug or feature

Copyright 2006 Sun Microsystems, Inc. All rights reserved.