KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > hivemind > definition > ConstructionContext


1 // Copyright 2007 The Apache Software Foundation
2
//
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 implied.
12
// See the License for the specific language governing permissions and
13
// limitations under the License.
14

15 package org.apache.hivemind.definition;
16
17 import org.apache.hivemind.internal.Module;
18 import org.apache.hivemind.internal.RegistryInfrastructure;
19
20 /**
21  * Interface that provides access to information and services needed
22  * during the construction of an {@link ExtensionDefinition extension}
23  * or {@link ExtensionPointDefinition extension point}.
24  *
25  * @author Achim Huegen
26  */

27 public interface ConstructionContext
28 {
29     /**
30      * @return the module that defined the constructor that is constructed now.
31      */

32     public Module getDefiningModule();
33     
34     /**
35      * @see Module#getService(String, Class)
36      */

37     public Object JavaDoc getService(String JavaDoc serviceId, Class JavaDoc serviceInterface);
38     
39     /**
40      * @see Module#getService(Class)
41      */

42     public Object JavaDoc getService(Class JavaDoc serviceInterface);
43     
44     /**
45      * @see Module#containsService(Class)
46      */

47     public boolean containsService(Class JavaDoc serviceInterface);
48
49     /**
50      * @see Module#getConfiguration(String)
51      */

52     public Object JavaDoc getConfiguration(String JavaDoc configurationId);
53     
54     /**
55      * Returns a reference to the {@link RegistryInfrastructure}.
56      * This allows access to services and configurations without the visibility checks
57      * performed by the other getter methods.
58      *
59      * @return the registry
60      */

61     public RegistryInfrastructure getRegistry();
62 }
63
Popular Tags