KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > cocoon > components > profiler > Profiler


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.components.profiler;
17
18 import org.apache.avalon.framework.component.Component;
19
20 import java.util.Collection JavaDoc;
21
22 /**
23  * Profiler component interface.
24  *
25  * @author <a HREF="mailto:vgritsenko@apache.org">Vadim Gritsenko</a>
26  * @author <a HREF="mailto:stephan@apache.org">Stephan Michels</a>
27  * @version CVS $Id: Profiler.java 30932 2004-07-29 17:35:38Z vgritsenko $
28  */

29 public interface Profiler extends Component
30 {
31     String JavaDoc ROLE = Profiler.class.getName();
32
33     /**
34      * Clear the results.
35      */

36     void clearResults();
37
38     /**
39      * Remove a specified result.
40      *
41      * @param key Key of the result.
42      */

43     void clearResult(Object JavaDoc key);
44
45     /**
46      * Add a result for a request.
47      *
48      * @param uri URI of the request
49      * @param data Result of the profiling
50      */

51     void addResult(String JavaDoc uri, ProfilerData data);
52
53     /**
54      * Returns a collection of all keys
55      *
56      * @return Keys of all results.
57      */

58     Collection JavaDoc getResultKeys();
59  
60     /**
61      * Returns a collection of the results.
62      *
63      * @return Collection of results.
64      */

65     Collection JavaDoc getResults();
66  
67     /**
68      * Returns a result of a specifed key.
69      *
70      * @param key Key of the result.
71      * @return Result.
72      */

73     ProfilerResult getResult(Object JavaDoc key);
74 }
75
Popular Tags