KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > avalon > fortress > impl > ComponentHandlerEntry


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

17
18 package org.apache.avalon.fortress.impl;
19
20 import org.apache.avalon.fortress.impl.handler.ComponentHandler;
21
22 /**
23  * This is the impl of runtime information about a
24  * ComponentHandler.
25  *
26  * @author <a HREF="mailto:dev@avalon.apache.org">Avalon Development Team</a>
27  * @version $Revision: 1.11 $ $Date: 2004/02/28 15:16:24 $
28  */

29 public final class ComponentHandlerEntry
30 {
31     private final ComponentHandler m_handler;
32     private final ComponentHandlerMetaData m_metaData;
33
34     /**
35      * Create an entry for a particular handler.
36      *
37      * @param handler the handler
38      * @param metaData the metadata for handler
39      */

40     public ComponentHandlerEntry( final ComponentHandler handler,
41                                   final ComponentHandlerMetaData metaData )
42     {
43         if ( null == handler )
44         {
45             throw new NullPointerException JavaDoc( "handler" );
46         }
47         if ( null == metaData )
48         {
49             throw new NullPointerException JavaDoc( "metaData" );
50         }
51
52         m_handler = handler;
53         m_metaData = metaData;
54     }
55
56     /**
57      * Return the handler that entry manages.
58      *
59      * @return the handler that entry manages.
60      */

61     public ComponentHandler getHandler()
62     {
63         return m_handler;
64     }
65
66     /**
67      * Return the meta data for handler.
68      *
69      * @return the meta data for handler.
70      */

71     public ComponentHandlerMetaData getMetaData()
72     {
73         return m_metaData;
74     }
75 }
76
Popular Tags