1 19 20 package org.apache.excalibur.instrument.client.http; 21 22 import org.apache.excalibur.instrument.client.InstrumentSampleElementData; 23 24 import org.apache.avalon.framework.configuration.Configuration; 25 import org.apache.avalon.framework.configuration.ConfigurationException; 26 27 abstract class AbstractHTTPInstrumentSampleElementData 28 extends AbstractHTTPElementData 29 implements InstrumentSampleElementData 30 { 31 32 private long m_interval; 33 34 35 private int m_size; 36 37 38 private int m_type; 39 40 41 private int m_value; 42 43 44 private long m_time; 45 46 47 private long m_leaseExpirationTime; 48 49 52 59 AbstractHTTPInstrumentSampleElementData( HTTPInstrumentManagerConnection connection, 60 AbstractHTTPData parent, 61 String name ) 62 { 63 super( connection, parent, name ); 64 } 65 66 69 76 protected void update( Configuration configuration ) 77 throws ConfigurationException 78 { 79 super.update( configuration ); 80 81 m_interval = configuration.getAttributeAsLong( "interval" ); 82 m_size = configuration.getAttributeAsInteger( "size" ); 83 m_type = configuration.getAttributeAsInteger( "type" ); 84 m_value = configuration.getAttributeAsInteger( "value" ); 85 m_time = configuration.getAttributeAsLong( "time" ); 86 m_leaseExpirationTime = configuration.getAttributeAsLong( "expiration-time" ); 87 } 88 89 92 97 public long getInterval() 98 { 99 return m_interval; 100 } 101 102 107 public int getSize() 108 { 109 return m_size; 110 } 111 112 121 public int getType() 122 { 123 return m_type; 124 } 125 126 133 public int getValue() 134 { 135 return m_value; 136 } 137 138 143 public long getTime() 144 { 145 return m_time; 146 } 147 148 153 public long getLeaseExpirationTime() 154 { 155 return m_leaseExpirationTime; 156 } 157 158 167 public int getInstrumentType() 168 { 169 return ((HTTPInstrumentData)getParent()).getType(); 170 } 171 172 175 } | Popular Tags |