com.sun.enterprise.admin.monitor.stats
Class StatisticImpl

java.lang.Object
  extended by com.sun.enterprise.admin.monitor.stats.StatisticImpl
All Implemented Interfaces:
Serializable, Statistic
Direct Known Subclasses:
BoundaryStatisticImpl, BoundedRangeStatisticImpl, CountStatisticImpl, RangeStatisticImpl, StringStatisticImpl, TimeStatisticImpl

public abstract class StatisticImpl
extends Object
implements Statistic, Serializable

An abstract class providing implementation of the Statistic interface The intent is for this to be subclassed by all the StatisticImpls.

Since:
S1AS8.0
Version:
1.0
Author:
Muralidhar Vempaty
See Also:
Serialized Form

Field Summary
static String DEFAULT_UNIT
          DEFAULT_UNIT is an empty string
static long DEFAULT_VALUE
          DEFAULT_VALUE of any statistic is 0
static StringManager localStrMgr
           
protected static String NEWLINE
           
 
Constructor Summary
protected StatisticImpl(String name, String unit, String desc, long start_time, long sample_time)
          Constructor
 
Method Summary
 String getDescription()
          returns the description of the statistic
 long getLastSampleTime()
          returns the time in millis, at which the last measurement was taken
 String getName()
          returns the name of the statistic
 long getStartTime()
          returns the time in millis, at which the first measurement was taken
 String getUnit()
          returns the unit of measurement for the statistic
 void setDescription(String desc)
          This is a hack.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_UNIT

public static final String DEFAULT_UNIT
DEFAULT_UNIT is an empty string


localStrMgr

public static final StringManager localStrMgr

DEFAULT_VALUE

public static final long DEFAULT_VALUE
DEFAULT_VALUE of any statistic is 0


NEWLINE

protected static final String NEWLINE
Constructor Detail

StatisticImpl

protected StatisticImpl(String name,
                        String unit,
                        String desc,
                        long start_time,
                        long sample_time)
Constructor

Parameters:
name - The name of the statistic
unit - The unit of measurement for this statistic
desc - A brief description of the statistic
startTime - Time in milliseconds at which the measurement was started
sampleTime - Time at which the last measurement was done.
Method Detail

getName

public String getName()
returns the name of the statistic

Specified by:
getName in interface Statistic

getDescription

public String getDescription()
returns the description of the statistic

Specified by:
getDescription in interface Statistic

getUnit

public String getUnit()
returns the unit of measurement for the statistic

Specified by:
getUnit in interface Statistic

getLastSampleTime

public long getLastSampleTime()
returns the time in millis, at which the last measurement was taken

Specified by:
getLastSampleTime in interface Statistic

getStartTime

public long getStartTime()
returns the time in millis, at which the first measurement was taken

Specified by:
getStartTime in interface Statistic

setDescription

public void setDescription(String desc)
This is a hack. This method allows us to internatinalize the descriptions. See bug Id: 5045413


toString

public String toString()
Overrides:
toString in class Object


Copyright © 2012. All Rights Reserved.