[Ejtools-cvs] libraries/j2ee.management/src/main/javax/management/j2ee/statistics BoundaryStatistic.
Brought to you by:
letiemble
Update of /cvsroot/ejtools/libraries/j2ee.management/src/main/javax/management/j2ee/statistics In directory sc8-pr-cvs1:/tmp/cvs-serv9476/src/main/javax/management/j2ee/statistics Added Files: BoundaryStatistic.java BoundedRangeStatistic.java CountStatistic.java EJBStats.java EntityBeanStats.java JCAConnectionPoolStats.java JCAConnectionStats.java JCAStats.java JDBCConnectionPoolStats.java JDBCConnectionStats.java JDBCStats.java JMSConnectionStats.java JMSConsumerStats.java JMSEndpointStats.java JMSProducerStats.java JMSSessionStats.java JMSStats.java JTAStats.java JVMStats.java JavaMailStats.java MessageDrivenBeanStats.java RangeStatistic.java ServletStats.java SessionBeanStats.java StatefulSessionBeanStats.java StatelessSessionBeanStats.java Statistic.java Stats.java TimeStatistic.java URLStats.java package.html Log Message: Add up-to-date JSR77 implementation. Can skip the Sun one. --- NEW FILE: BoundaryStatistic.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package javax.management.j2ee.statistics; /** * The BoundaryStatistic interface specifies standard measurements of the upper and * lower limits of the value of an attribute. * * @author Laurent Etiemble * @version $Revision: 1.1 $ */ public interface BoundaryStatistic extends Statistic { /** * Returns the upper limit of the value of this attribute. * * @return The upper bound value */ public long getUpperBound(); /** * Returns the lower limit of the value of this attribute. * * @return The lower bound value */ public long getLowerBound(); } --- NEW FILE: BoundedRangeStatistic.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package javax.management.j2ee.statistics; /** * The BoundedRangeStatistic interface extends the RangeStatistic and BoundaryStatistic * interfaces and provides standard measurements of a range that has fixed limits. * * @author Laurent Etiemble * @version $Revision: 1.1 $ */ public interface BoundedRangeStatistic extends BoundaryStatistic, RangeStatistic { } --- NEW FILE: CountStatistic.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package javax.management.j2ee.statistics; /** * The CountStatistic interface specifies standard count measurements. * * @author Laurent Etiemble * @version $Revision: 1.1 $ */ public interface CountStatistic extends Statistic { /** * Returns the count since the measurement started. * * @return The count value */ public long getCount(); } --- NEW FILE: EJBStats.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package javax.management.j2ee.statistics; /** * The EJBStats interface specifies statistics provided by all EJB component types. * <p align="center"> * * <img src="../../../../../images/stats-ejb.png" alt="EJB Stats Class Diagram"/> * </p> * * @author Laurent Etiemble * @version $Revision: 1.1 $ */ public interface EJBStats extends Stats { /** * Returns the number of times the beans create method was called. * * @return The create count */ public CountStatistic getCreateCount(); /** * Returns the number of times the beans remove method was called. * * @return The remove count */ public CountStatistic getRemoveCount(); } --- NEW FILE: EntityBeanStats.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package javax.management.j2ee.statistics; /** * Specifies statistics provided by entity beans. * * @author Laurent Etiemble * @version $Revision: 1.1 $ */ public interface EntityBeanStats extends EJBStats { /** * Returns the number of bean instances in the ready state. * * @return The ready count */ public RangeStatistic getReadyCount(); /** * Returns the number of bean instances in the pooled state. * * @return The pooled count */ public RangeStatistic getPooledCount(); } --- NEW FILE: JCAConnectionPoolStats.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package javax.management.j2ee.statistics; /** * The JCAConnectionPoolStats interface specifies the statistics provided by a JCA * connection pool. * * @author Laurent Etiemble * @version $Revision: 1.1 $ */ public interface JCAConnectionPoolStats extends JCAConnectionStats { /** * Returns the number of connections closed. * * @return The close count */ public CountStatistic getCloseCount(); /** * Returns the number of connections created. * * @return The create count */ public CountStatistic getCreateCount(); /** * Returns the number of free connections in the pool. * * @return The free pool size */ public BoundedRangeStatistic getFreePoolSize(); /** * Returns the size of the connection pool. * * @return The pool size */ public BoundedRangeStatistic getPoolSize(); /** * Returns the number of threads waiting for a connection. * * @return The waiting thread count */ public RangeStatistic getWaitingThreadCount(); } --- NEW FILE: JCAConnectionStats.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package javax.management.j2ee.statistics; import javax.management.ObjectName; /** * The JCAConnectionStats interface specifies the statistics provided by a JCA connection. * * @author Laurent Etiemble * @version $Revision: 1.1 $ */ public interface JCAConnectionStats extends Stats { /** * Returns the JCAConnectionFactory OBJECT_NAME of the managed object that identifies * the connectors connection factory for this connection. * * @return The connection factory */ public ObjectName getConnectionFactory(); /** * Returns the JCAManagedConnectionFactory OBJECT_NAME of the managed object that * identifies the connectors managed connection factory for this connection. * * @return The managed connection factory */ public ObjectName getManagedConnectionFactory(); /** * Returns time spent waiting for a connection to be available. * * @return The wait time */ public TimeStatistic getWaitTime(); /** * Returns the time spent using a connection. * * @return The use time */ public TimeStatistic getUseTime(); } --- NEW FILE: JCAStats.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package javax.management.j2ee.statistics; /** * The JCAStats interface specifies the statistics provided by a JCA resource. <p align="center"> * * <img src="../../../../../images/stats-jca.png" alt="JCA Stats Class Diagram"/> * </p> * * @author Laurent Etiemble * @version $Revision: 1.1 $ */ public interface JCAStats extends Stats { /** * Returns a list of JCAConnectionStats that provide statistics about the non-pooled * connections associated with the referencing JCA resource statistics. * * @return The connections stats */ public JCAConnectionStats[] getConnections(); /** * Returns a a list of JCAConnectionPoolStats that provide statistics about the * connection pools associated with the referencing JCA resource statistics. * * @return The connection pools stats */ public JCAConnectionPoolStats[] getConnectionPools(); } --- NEW FILE: JDBCConnectionPoolStats.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package javax.management.j2ee.statistics; /** * Specifies the statistics provided by a JDBC connection pool. * * @author Laurent Etiemble * @version $Revision: 1.1 $ */ public interface JDBCConnectionPoolStats extends JDBCConnectionStats { /** * Returns the number of connections created. * * @return The create count */ public CountStatistic getCreateCount(); /** * Returns the number of connections closed. * * @return The close count */ public CountStatistic getCloseCount(); /** * Returns the size of the connection pool. * * @return The pool size */ public BoundedRangeStatistic getPoolSize(); /** * Returns the number of free connections in the pool. * * @return The free pool size */ public BoundedRangeStatistic getFreePoolSize(); /** * Returns the number of threads waiting for a connection. * * @return The waiting thread count */ public RangeStatistic getWaitingThreadCount(); } --- NEW FILE: JDBCConnectionStats.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package javax.management.j2ee.statistics; import javax.management.ObjectName; /** * Specifies the statistics provided by a JDBC connection. * * @author Laurent Etiemble * @version $Revision: 1.1 $ */ public interface JDBCConnectionStats extends Stats { /** * Returns the name of the managed object that identifies the JDBC data source * for this connection. * * @return The jdbc data source */ public ObjectName getJdbcDataSource(); /** * Returns the time spent waiting for a connection to be available. * * @return The wait time */ public TimeStatistic getWaitTime(); /** * Returns the time spent using a connection. * * @return The use time */ public TimeStatistic getUseTime(); } --- NEW FILE: JDBCStats.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package javax.management.j2ee.statistics; /** * The JDBCStats type specifies the statistics provided by a JDBC resource. <p align="center"> * * <img src="../../../../../images/stats-jdbc.png" alt="JDBC Stats Class Diagram"/> * </p> * * @author Laurent Etiemble * @version $Revision: 1.1 $ */ public interface JDBCStats extends Stats { /** * Returns a list of JDBCConnectionStats that provide statistics about the non-pooled * connections associated with the referencing JDBC resource statistics. * * @return The connections stats */ public JDBCConnectionStats[] getConnections(); /** * Returns a list of JDBCConnectionPoolStats that provide statistics about the * connection pools associated with the referencing JDBC resource statistics. * * @return The connection pools stats */ public JDBCConnectionPoolStats[] getConnectionPools(); } --- NEW FILE: JMSConnectionStats.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package javax.management.j2ee.statistics; /** * Specifies the statistics provided by a JMS connection. * * @author Laurent Etiemble * @version $Revision: 1.1 $ */ public interface JMSConnectionStats extends Stats { /** * Returns a list of JMSSessionStats that provide statistics about the sessions * associated with the referencing JMSConnectionStats. * * @return The sessions stats */ public JMSSessionStats[] getSessions(); /** * Returns the transactional state of this JMS connection. If true, indicates * that this JMS connection is transactional. * * @return The transactional state */ public boolean isTransactional(); } --- NEW FILE: JMSConsumerStats.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package javax.management.j2ee.statistics; /** * Specifies the statistics provided by a JMS message consumer. * * @author Laurent Etiemble * @version $Revision: 1.1 $ */ public interface JMSConsumerStats extends JMSEndpointStats { /** * Returns a string that encapsulates the identity of a message origin. * * @return The origin */ public String getOrigin(); } --- NEW FILE: JMSEndpointStats.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package javax.management.j2ee.statistics; /** * Specifies the base interface for the statistics provided by a JMS message producer * or a JMS message consumer. * * @author Laurent Etiemble * @version $Revision: 1.1 $ */ public interface JMSEndpointStats extends Stats { /** * Returns the number of messages sent or received. * * @return The message count */ public CountStatistic getMessageCount(); /** * Returns the number of pending messages. * * @return The pending message count */ public CountStatistic getPendingMessageCount(); /** * Returns the number of messages that expired before delivery. * * @return The expired message count */ public CountStatistic getExpiredMessageCount(); /** * Returns the time spent by a message before being delivered. * * @return The message wait time */ public TimeStatistic getMessageWaitTime(); } --- NEW FILE: JMSProducerStats.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package javax.management.j2ee.statistics; /** * Specifies the statistics provided by a JMS message producer. * * @author Laurent Etiemble * @version $Revision: 1.1 $ */ public interface JMSProducerStats extends JMSEndpointStats { /** * Returns a string that encapsulates the identity of a message destination. * * @return The destination */ public String getDestination(); } --- NEW FILE: JMSSessionStats.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package javax.management.j2ee.statistics; /** * Specifies the statistics provided by a JMS session. * * @author Laurent Etiemble * @version $Revision: 1.1 $ */ public interface JMSSessionStats extends Stats { /** * Returns a list of JMSProducerStats that provide statistics about the message * producers associated with the referencing JMS session statistics. * * @return The producers stats */ public JMSProducerStats[] getProducers(); /** * Returns a list of JMSConsumerStats that provide statistics about the message * consumers associated with the referencing JMS session statistics. * * @return The consumers stats */ public JMSConsumerStats[] getConsumers(); /** * Returns the number of messages exchanged. * * @return The message count */ public CountStatistic getMessageCount(); /** * Returns the number of pending messages. * * @return The pending message count */ public CountStatistic getPendingMessageCount(); /** * Returns the number of expired messages. * * @return The expired message count */ public CountStatistic getExpiredMessageCount(); /** * Returns the time spent by a message before being delivered. * * @return The message wait time */ public TimeStatistic getMessageWaitTime(); /** * Returns the number of durable subscriptions. * * @return The durable subscription count */ public CountStatistic getDurableSubscriptionCount(); } --- NEW FILE: JMSStats.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package javax.management.j2ee.statistics; /** * The JMSStats interface specifies the statistics provided by a JMS resource. <p align="center"> * * <img src="../../../../../images/stats-jms.png" alt="JMS Stats Class Diagram"/> * </p> * * @author Laurent Etiemble * @version $Revision: 1.1 $ */ public interface JMSStats extends Stats { /** * Returns a list of JMSConnectionStats that provide statistics about the connections * associated with the referencing JMS resource. * * @return The connections stats */ public JMSConnectionStats[] getConnections(); } --- NEW FILE: JTAStats.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package javax.management.j2ee.statistics; /** * Specifies the statistics provided by a JTA resource. * * @author Laurent Etiemble * @version $Revision: 1.1 $ */ public interface JTAStats extends Stats { /** * Returns the number of active transactions. * * @return The active count */ public CountStatistic getActiveCount(); /** * Returns the number of committed transactions. * * @return The committed count */ public CountStatistic getCommittedCount(); /** * Returns the number of rolled-back transactions. * * @return The rolledback count */ public CountStatistic getRolledbackCount(); } --- NEW FILE: JVMStats.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package javax.management.j2ee.statistics; /** * Specifies the statistics provided by a Java VM. * * @author Laurent Etiemble * @version $Revision: 1.1 $ */ public interface JVMStats extends Stats { /** * Returns the amount of time the JVM has been running. * * @return The up time */ public CountStatistic getUpTime(); /** * Returns the size of the JVMs heap. * * @return The heap size */ public BoundedRangeStatistic getHeapSize(); } --- NEW FILE: JavaMailStats.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package javax.management.j2ee.statistics; /** * Specifies the statistics provided by a JavaMail resource. * * @author Laurent Etiemble * @version $Revision: 1.1 $ */ public interface JavaMailStats extends Stats { /** * Returns the number of mail messages sent. * * @return The sent mail count */ public CountStatistic getSentMailCount(); } --- NEW FILE: MessageDrivenBeanStats.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package javax.management.j2ee.statistics; /** * Specifies the statistics provided by a message driven bean. * * @author Laurent Etiemble * @version $Revision: 1.1 $ */ public interface MessageDrivenBeanStats extends EJBStats { /** * Returns the number of messages received. * * @return The message count */ public CountStatistic getMessageCount(); } --- NEW FILE: RangeStatistic.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package javax.management.j2ee.statistics; /** * Specifies standard measurements of the lowest and highest values an attribute * has held as well as its current value. * * @author Laurent Etiemble * @version $Revision: 1.1 $ */ public interface RangeStatistic extends Statistic { /** * Returns the highest value this attribute has held since the beginning of the * measurement. * * @return The high water mark value */ public long getHighWaterMark(); /** * Returns the lowest value this attribute has held since the beginning of the * measurement. * * @return The low water mark value */ public long getLowWaterMark(); /** * Returns the current value of this attribute. * * @return The current value */ public long getCurrent(); } --- NEW FILE: ServletStats.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package javax.management.j2ee.statistics; /** * Specifies the statistics provided by a Servlet component. * * @author Laurent Etiemble * @version $Revision: 1.1 $ */ public interface ServletStats extends Stats { /** * Returns the execution time of the servlets service method. * * @return The serviceTime value */ public TimeStatistic getServiceTime(); } --- NEW FILE: SessionBeanStats.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package javax.management.j2ee.statistics; /** * Specifies the statistics provided by session beans of both stateful and stateless * types. * * @author Laurent Etiemble * @version $Revision: 1.1 $ */ public interface SessionBeanStats extends EJBStats { /** * Returns the number of beans in the method-ready state. * * @return The method ready count */ public RangeStatistic getMethodReadyCount(); } --- NEW FILE: StatefulSessionBeanStats.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package javax.management.j2ee.statistics; /** * Specifies the statistics provided by a stateful session bean. * * @author Laurent Etiemble * @version $Revision: 1.1 $ */ public interface StatefulSessionBeanStats extends SessionBeanStats { /** * Returns the number of beans that are in the passivated state. * * @return The passive count */ public RangeStatistic getPassiveCount(); } --- NEW FILE: StatelessSessionBeanStats.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package javax.management.j2ee.statistics; /** * Specifies the statistics provided by a stateless session bean. * * @author Laurent Etiemble * @version $Revision: 1.1 $ */ public interface StatelessSessionBeanStats extends SessionBeanStats { } --- NEW FILE: Statistic.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package javax.management.j2ee.statistics; /** * The Statistic interface and its subinterfaces specify the required accessors which * provide the performance data described by the specific attributes in the Stats * interfaces. The Statistic subinterfaces specify accessors which provide statistical * data about count, time, and both bounded and unbounded ranges. <p align="center"> * * <img src="../../../../../images/statistics-overview.png" alt="Statistics Class * Diagram"/></p> * * @author Laurent Etiemble * @version $Revision: 1.1 $ */ public interface Statistic { /** * Returns the name of this Statistic. The name must always correspond to the * name of the Stats accessor that is providing the data for this statistic. * * @return The name value */ public String getName(); /** * Returns the unit of measurement for this Statistic. Valid values for TimeStatistic * measurements are "HOUR", "MINUTE", "SECOND", "MILLISECOND", "MICROSECOND" and * "NANOSECOND". * * @return The unit */ public String getUnit(); /** * Returns a human-readable description of the Statistic. * * @return The description */ public String getDescription(); /** * Returns the time the first measurment was taken represented as a long, whose * value is the number of milliseconds since "January 1, 1970, 00:00:00". * * @return The start time value */ public long getStartTime(); /** * Returns the time the most recent measurment was taken represented as a long, * whose value is the number of milliseconds since "January 1, 1970, 00:00:00". * * @return The last sample time value */ public long getLastSampleTime(); } --- NEW FILE: Stats.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package javax.management.j2ee.statistics; /** * The Stats interface and its subinterfaces specify performance data accessors for * each of the specific managed object types. <p> * * The data required by the interfaces is commonly available on all platform implementations. * Managed objects that support statistics are permitted to provide support for a * subset of the accessors in the Stats interfaces. Managed objects indicate which * of the specified accessors return valid data by including only the names of the * supported statistics in the statisticNames list. The data provided by a supported * statistic must be exactly as specified by the corresponding Stats interface. The * Stats interfaces may be extended to provide vendor specific performance statistics. * Vendor specific perfomance statistics must implement or extend one of the standard * Statistics interfaces.</p> * * @author Laurent Etiemble * @version $Revision: 1.1 $ */ public interface Stats { /** * Gets a Statistic by name. * * @param statisticName The statistic name * @return The Statistic */ public Statistic getStatistic(String statisticName); /** * Returns a list of the names of the attributes from the specific Stats interface * that this object supports. Attributes named in the list must correspond to * the names of operations in the Stats interface that will return Statistics * object of the appropriate type which contains valid data. Each operation in * a Stats interface is an accessor which follows the pattern getAttributeName. * The AttributeName portion of the operation name is the value that is returned * as the name in the StatisticNames list. <p> * * The value of attributes whose names are not included in the StatisticNames * list is undefined and must be considered invalid. For each attribute name in * the StatisticNames list that returns a Statistic there must be one Statistic * object with the same name in the statistics list.</p> * * @return The statistic names */ public String[] getStatisticNames(); /** * Returns a list of all the Statistic objects supported by this Stats object. * * @return An array of Statistics */ public Statistic[] getStatistics(); } --- NEW FILE: TimeStatistic.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package javax.management.j2ee.statistics; /** * Specifies standard timing measurements for a given operation. * * @author Laurent Etiemble * @version $Revision: 1.1 $ */ public interface TimeStatistic extends Statistic { /** * Returns the number of times the operation was invoked since the beginning of * this measurement. * * @return The count value */ public long getCount(); /** * Returns the maximum amount of time taken to complete one invocation of this * operation since the beginning of this measurement. * * @return The max time value */ public long getMaxTime(); /** * Returns the minimum amount of time taken to complete one invocation of this * operation since the beginning of this measurement. * * @return The min time value */ public long getMinTime(); /** * Returns the sum total of time taken to complete every invocation of this operation * since the beginning of this measurement. Dividing totalTime by count will give * you the average execution time for this operation. * * @return The total time value */ public long getTotalTime(); } --- NEW FILE: URLStats.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package javax.management.j2ee.statistics; /** * Specifies the statistics provided by a URL resource. * * @author Laurent Etiemble * @version $Revision: 1.1 $ */ public interface URLStats extends Stats { } --- NEW FILE: package.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <!-- EJTools, the Enterprise Java Tools Distributable under LGPL license. See terms of license at www.gnu.org. $Revision: 1.1 $ --> <html> <head/> <body> Provides statistics releated classes and interfaces. <p> The Performance Data Framework consists of the StatisticsProvider model, which any managed object may implement, the Stats interfaces, which specify standard performance attribute semantics for each managed object type, and the Statistic interfaces which provide specific interfaces for representing the common performance data types.</p> <h2>Package Specification</h2> <ul> <li><a href="http://jcp.org/jsr/detail/77.jsp">JSR 77, J2EE Management</a></li> </ul> <h2>Related Documentation</h2> For overviews, tutorials, examples, guides, and tool documentation, please see: <ul> <li><a href="http://java.sun.com/j2ee/tools">J2EE Tools</a></li> </ul> </body> </html> |