Methods Summary |
---|
public static java.util.Map | compositeDataToMap(javax.management.openmbean.CompositeData data)
return( TypeCast.asMap( OpenMBeanUtil.compositeDataToMap( data ) ) );
|
public static Stats | create(java.lang.Class theInterface, javax.management.openmbean.CompositeData data)Create a new Stats using the specified CompositeData
final Map<String,Statistic> statistics = TypeCast.asMap( compositeDataToMap( data ) );
return( createStats( theInterface, statistics ) );
|
public static EJBStats | createEJBStats(java.util.Map statistics)
return( createStats( EJBStats.class, statistics ) );
|
public static EntityBeanStats | createEntityBeanStats(java.util.Map statistics)
return( createStats( EntityBeanStats.class, statistics ) );
|
public static JCAConnectionPoolStats | createJCAConnectionPoolStats(java.util.Map statistics)
return( createStats( JCAConnectionPoolStats.class, statistics ) );
|
public static JCAConnectionStats | createJCAConnectionStats(java.util.Map statistics)
return( createStats( JCAConnectionStats.class, statistics ) );
|
public static JCAStats | createJCAStats(java.util.Map statistics)
return( createStats( JCAStats.class, statistics ) );
|
public static JDBCConnectionPoolStats | createJDBCConnectionPoolStats(java.util.Map statistics)
return( createStats( JDBCConnectionPoolStats.class, statistics ) );
|
public static JDBCConnectionStats | createJDBCConnectionStats(java.util.Map statistics)
return( createStats( JDBCConnectionStats.class, statistics ) );
|
public static JDBCStats | createJDBCStats(java.util.Map statistics)
return( createStats( JDBCStats.class, statistics ) );
|
public static JMSConnectionStats | createJMSConnectionStats(java.util.Map statistics)
return( createStats( JMSConnectionStats.class, statistics ) );
|
public static JMSConsumerStats | createJMSConsumerStats(java.util.Map statistics)
return( createStats( JMSConsumerStats.class, statistics ) );
|
public static JMSEndpointStats | createJMSEndpointStats(java.util.Map statistics)
return( createStats( JMSEndpointStats.class, statistics ) );
|
public static JMSProducerStats | createJMSProducerStats(java.util.Map statistics)
return( createStats( JMSProducerStats.class, statistics ) );
|
public static JMSSessionStats | createJMSSessionStats(java.util.Map statistics)
return( createStats( JMSSessionStats.class, statistics ) );
|
public static JMSStats | createJMSStats(java.util.Map statistics)
return( createStats( JMSStats.class, statistics ) );
|
public static JTAStats | createJTAStats(java.util.Map statistics)
return( createStats( JTAStats.class, statistics ) );
|
public static JVMStats | createJVMStats(java.util.Map statistics)
return( createStats( JVMStats.class, statistics ) );
|
public static JavaMailStats | createJavaMailStats(java.util.Map statistics)
// bizarre compiler error in JDK 1.5.0_06 forces us to inline the code here
final Class<JavaMailStats> theInterface = JavaMailStats.class;
JavaMailStats result = null;
// generate a proxy
final MapGetterInvocationHandler handler =
new MapGetterInvocationHandler<Statistic>( statistics );
final ClassLoader classLoader = theInterface.getClassLoader();
final Class<JavaMailStats>[] interfaces = TypeCast.asArray( new Class[] { theInterface } );
result = (JavaMailStats)Proxy.newProxyInstance( classLoader, interfaces, handler);
return result;
|
public static MessageDrivenBeanStats | createMessageDrivenBeanStats(java.util.Map statistics)
return( createStats( MessageDrivenBeanStats.class, statistics ) );
|
public static ServletStats | createServletStats(java.util.Map statistics)
return( createStats( ServletStats.class, statistics ) );
|
public static SessionBeanStats | createSessionBeanStats(java.util.Map statistics)
return( createStats( SessionBeanStats.class, statistics ) );
|
public static StatefulSessionBeanStats | createStatefulSessionBeanStats(java.util.Map statistics)
return( createStats( StatefulSessionBeanStats.class, statistics ) );
|
public static StatelessSessionBeanStats | createStatelessSessionBeanStats(java.util.Map statistics)
return( createStats( StatelessSessionBeanStats.class, statistics ) );
|
public static Stats | createStats(javax.management.openmbean.CompositeData data)Create a Stats using Stats class found as data.getCompositeType().getTypeName().
If this interface is not available, a generic Stats interface will be used.
final String typeName = data.getCompositeType().getTypeName();
Class<? extends Stats> theInterface = null;
try
{
theInterface = TypeCast.asClass( ClassUtil.classForName( typeName ) );
}
catch( Exception e )
{
theInterface = Stats.class;
}
return( create( theInterface, data ) );
|
public static T | createStats(java.lang.Class theInterface, java.util.Map statistics)Create a new Stats using the specified Map. The standard JSR 77
Statistic types are handled appropriately. Custom (non-standard) Stats
may also be used; in this case a proxy is returned which implements
the interface specified by theClass.
if ( ! Stats.class.isAssignableFrom( theInterface ) )
{
throw new IllegalArgumentException( theInterface.getName() );
}
// generate a proxy
final MapGetterInvocationHandler handler =
new MapGetterInvocationHandler<Statistic>( statistics );
final ClassLoader classLoader = theInterface.getClassLoader();
final Class<T>[] interfaces = TypeCast.asArray( new Class[] { theInterface } );
final Object proxy = Proxy.newProxyInstance( classLoader, interfaces, handler);
return theInterface.cast( proxy );
|
public static T | createStats(java.lang.Class theInterface, Statistic[] statistics)Calls createStats( theInterface, J2EEUtil.statisticsToMap( statistics ) )
final Map<String,Statistic> statisticsMap = J2EEUtil.statisticsToMap( statistics );
return( createStats( theInterface, statisticsMap ) );
|
public static URLStats | createURLStats(java.util.Map statistics)
return( createStats( URLStats.class, statistics ) );
|
private void | test()
createStats( EJBStats.class, new java.util.HashMap<String,Statistic>() );
|