1 23 24 29 30 package com.sun.appserv.management.j2ee.statistics; 31 32 import java.util.Map ; 33 import java.io.Serializable ; 34 35 import javax.management.openmbean.CompositeData ; 36 37 import com.sun.appserv.management.util.jmx.OpenMBeanUtil; 38 39 import com.sun.appserv.management.j2ee.statistics.StatisticImpl; 40 41 44 public final class StringStatisticImpl 45 extends StatisticImpl implements StringStatistic, Serializable 46 { 47 static final long serialVersionUID = 2090185734375468511L; 48 49 private final String mCurrent; 50 51 public 52 StringStatisticImpl( final CompositeData compositeData ) 53 { 54 this( OpenMBeanUtil.compositeDataToMap( compositeData ) ); 55 } 56 57 public 58 StringStatisticImpl( final Map <String ,?> m ) 59 { 60 this( new MapStatisticImpl( m ) ); 61 } 62 63 public 64 StringStatisticImpl( final StringStatistic s ) 65 { 66 super( s ); 67 68 mCurrent = s.getCurrent(); 69 } 70 71 public 72 StringStatisticImpl( final MapStatistic m ) 73 { 74 super( m ); 75 76 mCurrent = m.getString( "Current" ); 77 } 78 79 public 80 StringStatisticImpl( 81 final String name, 82 final String description, 83 final String unit, 84 final long startTime, 85 final long lastSampleTime, 86 final String current ) 87 { 88 super( name, description, unit, startTime, lastSampleTime ); 89 mCurrent = current; 90 } 91 92 93 public String 94 getCurrent() 95 { 96 return( mCurrent ); 97 } 98 } 99 100 101 102 103 104 | Popular Tags |