KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > excalibur > instrument > manager > http > AbstractHandler


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.manager.http;
21
22 import org.apache.excalibur.instrument.manager.http.server.AbstractHTTPURLPrintWriterHandler;
23 import org.apache.excalibur.instrument.manager.DefaultInstrumentManager;
24
25 /**
26  *
27  * @author <a HREF="mailto:dev@avalon.apache.org">Avalon Development Team</a>
28  * @version CVS $Revision: 1.5 $ $Date: 2004/03/06 14:01:28 $
29  * @since 4.1
30  */

31 public abstract class AbstractHandler
32     extends AbstractHTTPURLPrintWriterHandler
33 {
34     /** The instrument manager */
35     private DefaultInstrumentManager m_manager;
36     
37     /** Reference to the connector. */
38     private InstrumentManagerHTTPConnector m_connector;
39     
40     /*---------------------------------------------------------------
41      * Constructors
42      *-------------------------------------------------------------*/

43     /**
44      * Creates a new AbstractHandler.
45      *
46      * @param path The path handled by this handler.
47      * @param contentType The content type.
48      * @param manager Reference to the instrument manager interface.
49      * @param connector The InstrumentManagerHTTPConnector.
50      */

51     public AbstractHandler( String JavaDoc path,
52                             String JavaDoc contentType,
53                             DefaultInstrumentManager manager,
54                             InstrumentManagerHTTPConnector connector )
55     {
56         super( path, contentType, InstrumentManagerHTTPConnector.ENCODING );
57         
58         m_manager = manager;
59         m_connector = connector;
60     }
61     
62     /*---------------------------------------------------------------
63      * Methods
64      *-------------------------------------------------------------*/

65     /**
66      * Returns a reference to the instrument manager interface.
67      *
68      * @return A reference to the instrument manager interface.
69      */

70     public DefaultInstrumentManager getInstrumentManager()
71     {
72         return m_manager;
73     }
74     
75     protected InstrumentManagerHTTPConnector getConnector()
76     {
77         return m_connector;
78     }
79 }
80
81
Popular Tags