KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > cocoon > webservices > instrument > InstrumentationService


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

16 package org.apache.cocoon.webservices.instrument;
17
18 import org.apache.avalon.framework.component.Component;
19 import org.apache.excalibur.instrument.InstrumentManageable;
20
21 /**
22  * Component interface for retrieving sample information from the
23  * InstrumentManager.
24  *
25  * @author <a HREF="mailto:crafterm@apache.org">Marcus Crafter</a>
26  * @version CVS $Id: InstrumentationService.java 53741 2004-10-04 19:24:11Z vgritsenko $
27  */

28 public interface InstrumentationService extends InstrumentManageable, Component {
29
30     /**
31      * Component ROLE name
32      */

33     String JavaDoc ROLE = InstrumentationService.class.getName();
34
35     /**
36      * Obtain an array of samples from a specified sample name.
37      *
38      * <p>
39      * The specified path parameter identifies a sample, hierarchically from
40      * Instrumentable name to Instrument name, to Instrument sample name
41      * (including any child Instrumentables) using the '.' character as a
42      * separator.
43      * </p>
44      *
45      * <pre>
46      * eg: instrument-manager.active-thread-count.maximum_1000_600
47      * </pre>
48      *
49      * <p>
50      * The above example identifies the sample 'maximum_1000_600' on instrument
51      * 'active-thread-count', on instrumentable 'instrument-manager'.
52      * </p>
53      *
54      * <p>
55      * The length of the returned array is dependant on the configuration of the
56      * sample being accessed. Check instrumentation.xconf for the length of pre-
57      * defined samples that operate constantly, when instrumentation is enabled.
58      * </p>
59      *
60      * @param path path value
61      * @return an <code>int[]</code> array of samples
62      * @exception Exception if an error occurs
63      */

64     int[] getSampleSnapshot(String JavaDoc path)
65         throws Exception JavaDoc;
66
67     /**
68      * Obtains an array of instrumentable sample names
69      *
70      * @return a {@link String}[] array of sample names
71      */

72     String JavaDoc[] getSampleNames();
73 }
74
Popular Tags