KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > excalibur > instrument > test > AbstractInstrumentableImpl


1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one or more
3  * contributor license agreements. See the NOTICE file distributed with
4  * this work for additional information regarding copyright ownership.
5  * The ASF licenses this file to You under the Apache License, Version 2.0
6  * (the "License"); you may not use this file except in compliance with
7  * the License. You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
14  * implied.
15  *
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  */

19
20 package org.apache.excalibur.instrument.test;
21
22 import org.apache.excalibur.instrument.AbstractInstrumentable;
23 import org.apache.excalibur.instrument.Instrument;
24 import org.apache.excalibur.instrument.Instrumentable;
25
26 /**
27  * Test Implementation of an AbstractInstrumentable.
28  *
29  * @author <a HREF="mailto:dev@avalon.apache.org">Avalon Development Team</a>
30  * @version CVS $Revision: 1.4 $ $Date: 2004/02/28 11:47:34 $
31  */

32 public class AbstractInstrumentableImpl
33     extends AbstractInstrumentable
34 {
35     /*---------------------------------------------------------------
36      * Constructors
37      *-------------------------------------------------------------*/

38     public AbstractInstrumentableImpl( String JavaDoc name )
39     {
40         setInstrumentableName( name );
41     }
42     
43     /*---------------------------------------------------------------
44      * AbstractInstrumentable Methods
45      *-------------------------------------------------------------*/

46     /**
47      * Adds an Instrument to the list of Instruments published by the component.
48      * This method may not be called after the Instrumentable has been
49      * registered with the InstrumentManager.
50      *
51      * @param instrument Instrument to publish.
52      */

53     public void addInstrument( Instrument instrument )
54     {
55         // Make this method public for testing.
56
super.addInstrument( instrument );
57     }
58
59     /**
60      * Adds a child Instrumentable to the list of child Instrumentables
61      * published by the component. This method may not be called after the
62      * Instrumentable has been registered with the InstrumentManager.
63      * <p>
64      * Note that Child Instrumentables must be named by the caller using the
65      * setInstrumentableName method.
66      *
67      * @param child Child Instrumentable to publish.
68      */

69     public void addChildInstrumentable( Instrumentable child )
70     {
71         // Make this method public for testing.
72
super.addChildInstrumentable( child );
73     }
74 }
75
Popular Tags