KickJava   Java API By Example, From Geeks To Geeks.

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


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 java.util.Collection JavaDoc;
18
19 import org.apache.hivemind.ApplicationRuntimeException;
20
21 /**
22  * Defines a service extension point.
23  * The definition includes the service interface, implementations and interceptors.
24  *
25  * @author Achim Huegen
26  */

27 public interface ServicePointDefinition extends ExtensionPointDefinition
28 {
29     /**
30      * @return the fully qualified class name of the service interface.
31      * This may be the name of a ordinary class or an interface.
32      */

33     public String JavaDoc getInterfaceClassName();
34
35     /**
36      * @return the default implementation of the service. The default is selected
37      * by {@link ImplementationDefinition#isDefault()} if multiple exist.
38      */

39     public ImplementationDefinition getDefaultImplementation();
40
41     /**
42      * Adds an implementation definition to the service point.
43      * @param implementation the implementation
44      * @throws ApplicationRuntimeException if this point is not visible from the module
45      * that defines the implementation
46      */

47     public void addImplementation(ImplementationDefinition implementation);
48
49     /**
50      * @return the impelementations of this service point as instances of {@link ImplementationDefinition}
51      */

52     public Collection JavaDoc getImplementations();
53
54     /**
55      * @return the interceptors of this service point as instances of {@link InterceptorDefinition}
56      */

57     public Collection JavaDoc getInterceptors();
58
59     /**
60      * Adds an interceptor definition to the service point.
61      * @param interceptor the interceptor
62      * @throws ApplicationRuntimeException if this point is not visible from the module
63      * that defines the interceptor.
64      */

65     public void addInterceptor(InterceptorDefinition interceptor);
66
67 }
Popular Tags