1 50 package org.apache.excalibur.instrument.manager; 51 52 import org.apache.excalibur.instrument.manager.interfaces.InstrumentDescriptor; 53 import org.apache.excalibur.instrument.manager.interfaces.InstrumentableDescriptor; 54 import org.apache.excalibur.instrument.manager.interfaces.NoSuchInstrumentException; 55 import org.apache.excalibur.instrument.manager.interfaces.NoSuchInstrumentableException; 56 57 65 public class InstrumentableDescriptorLocalImpl 66 implements InstrumentableDescriptorLocal 67 { 68 69 private InstrumentableProxy m_instrumentableProxy; 70 71 74 79 InstrumentableDescriptorLocalImpl( InstrumentableProxy instrumentableProxy ) 80 { 81 m_instrumentableProxy = instrumentableProxy; 82 } 83 84 87 93 public boolean isConfigured() 94 { 95 return m_instrumentableProxy.isConfigured(); 96 } 97 98 104 public boolean isRegistered() 105 { 106 return m_instrumentableProxy.isRegistered(); 107 } 108 109 117 public String getName() 118 { 119 return m_instrumentableProxy.getName(); 120 } 121 122 127 public String getDescription() 128 { 129 return m_instrumentableProxy.getDescription(); 130 } 131 132 144 public InstrumentableDescriptor getChildInstrumentableDescriptor( 145 String childInstrumentableName ) 146 throws NoSuchInstrumentableException 147 { 148 return getChildInstrumentableDescriptorLocal( childInstrumentableName ); 149 } 150 151 158 public InstrumentableDescriptor[] getChildInstrumentableDescriptors() 159 { 160 return getChildInstrumentableDescriptorLocals(); 161 } 162 163 173 public InstrumentDescriptor getInstrumentDescriptor( String instrumentName ) 174 throws NoSuchInstrumentException 175 { 176 return getInstrumentDescriptorLocal( instrumentName ); 177 } 178 179 186 public InstrumentDescriptor[] getInstrumentDescriptors() 187 { 188 return getInstrumentDescriptorLocals(); 189 } 190 191 200 public int getStateVersion() 201 { 202 return m_instrumentableProxy.getStateVersion(); 203 } 204 205 208 220 public InstrumentableDescriptorLocal getChildInstrumentableDescriptorLocal( 221 String childInstrumentableName ) 222 throws NoSuchInstrumentableException 223 { 224 InstrumentableProxy instrumentableProxy = 225 m_instrumentableProxy.getChildInstrumentableProxy( childInstrumentableName ); 226 if( instrumentableProxy == null ) 227 { 228 throw new NoSuchInstrumentableException( 229 "No child instrumentable can be found using name: " + childInstrumentableName ); 230 } 231 232 return instrumentableProxy.getDescriptor(); 233 } 234 235 242 public InstrumentableDescriptorLocal[] getChildInstrumentableDescriptorLocals() 243 { 244 return m_instrumentableProxy.getChildInstrumentableDescriptors(); 245 } 246 247 257 public InstrumentDescriptorLocal getInstrumentDescriptorLocal( String instrumentName ) 258 throws NoSuchInstrumentException 259 { 260 InstrumentProxy instrumentProxy = 261 m_instrumentableProxy.getInstrumentProxy( instrumentName ); 262 if( instrumentProxy == null ) 263 { 264 throw new NoSuchInstrumentException( 265 "No instrument can be found using name: " + instrumentName ); 266 } 267 268 return instrumentProxy.getDescriptor(); 269 } 270 271 278 public InstrumentDescriptorLocal[] getInstrumentDescriptorLocals() 279 { 280 return m_instrumentableProxy.getInstrumentDescriptors(); 281 } 282 } 283 | Popular Tags |