KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > hivemind > internal > ServiceInterceptorContribution


1 // Copyright 2004, 2005 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.internal;
16
17 import org.apache.hivemind.InterceptorStack;
18 import org.apache.hivemind.Locatable;
19
20 /**
21  * A contribution to a service extension point that creates an interceptor.
22  *
23  * @author Howard Lewis Ship
24  */

25 public interface ServiceInterceptorContribution extends Locatable
26 {
27     /**
28      * Returns the name of the service interceptor. The name is used for ordering the
29      * service interceptor with respect to other interceptors. The name defaults
30      * to the factoryServiceId if no name is specified.
31      * @return the name of the service interceptor
32      * @since 1.1
33      */

34     public String JavaDoc getName();
35     
36     /**
37      * Returns the id of the factory that creates the interceptor. Interceptor factories are simply
38      * another HiveMind service, one that implements
39      * {@link org.apache.hivemind.ServiceInterceptorFactory}.
40      */

41     public String JavaDoc getFactoryServiceId();
42
43     /**
44      * Invoked to actually create the interceptor and push it onto the stack.
45      */

46     public void createInterceptor(InterceptorStack stack);
47
48     /**
49      * Returns a list interceptors service ids as a comma seperated list. The behavior provided by
50      * these interceptors should <em>precede</em> the behavior of this interceptor.
51      * <p>
52      * Each service id is fully qualified. May return null.
53      */

54     public String JavaDoc getPrecedingInterceptorIds();
55
56     /**
57      * As {@link #getPrecedingInterceptorIds()}, but the indicating interceptors's behavior should
58      * <em>follow</em> this interceptor's.
59      */

60
61     public String JavaDoc getFollowingInterceptorIds();
62 }
Popular Tags