KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > hivemind > definition > impl > InterceptorDefinitionImpl


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.impl;
16
17 import org.apache.hivemind.Location;
18 import org.apache.hivemind.definition.InterceptorConstructor;
19 import org.apache.hivemind.definition.InterceptorDefinition;
20 import org.apache.hivemind.definition.ModuleDefinition;
21
22 /**
23  * Default implementation of {@link InterceptorDefinition}.
24  * Implementations of this interface may additionally implement the {@link org.apache.hivemind.Orderable}
25  * interface if a certain interceptor order is required.
26  *
27  * @author Achim Huegen
28  */

29 public class InterceptorDefinitionImpl extends ExtensionDefinitionImpl implements InterceptorDefinition
30 {
31     private InterceptorConstructor _interceptorConstructor;
32     private String JavaDoc _name;
33
34     public InterceptorDefinitionImpl(ModuleDefinition module)
35     {
36         super(module);
37     }
38
39     public InterceptorDefinitionImpl(ModuleDefinition module, String JavaDoc name, Location location,
40             InterceptorConstructor interceptorConstructor)
41     {
42         super(module, location);
43         _name = name;
44         _interceptorConstructor = interceptorConstructor;
45     }
46
47     /**
48      * @see org.apache.hivemind.definition.InterceptorDefinition#getInterceptorConstructor()
49      */

50     public InterceptorConstructor getInterceptorConstructor()
51     {
52         return _interceptorConstructor;
53     }
54
55     /**
56      * Sets the constructor implementation responsible for the creation of interceptor instances.
57      */

58     public void setInterceptorConstructor(InterceptorConstructor interceptorConstructor)
59     {
60         _interceptorConstructor = interceptorConstructor;
61     }
62
63     /**
64      * @see org.apache.hivemind.definition.InterceptorDefinition#getName()
65      */

66     public String JavaDoc getName()
67     {
68         return _name;
69     }
70
71     /**
72      * Sets the name of the interceptor.
73      */

74     public void setName(String JavaDoc name)
75     {
76         _name = name;
77     }
78     
79 }
80
Popular Tags