KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > springframework > aop > framework > AopProxyFactory


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

16
17 package org.springframework.aop.framework;
18
19 /**
20  * Interface to be implemented by factories that are able to create
21  * AOP proxies based on {@link AdvisedSupport} configuration objects.
22  *
23  * <p>Proxies should observe the following contract:
24  * <ul>
25  * <li>They should implement all interfaces that the configuration
26  * indicates should be proxied.
27  * <li>They should implement the {@link Advised} interface.
28  * <li>They should implement the equals method to compare proxied
29  * interfaces, advice, and target.
30  * <li>They should be serializable if all advisors and target
31  * are serializable.
32  * <li>They should be thread-safe if advisors and target
33  * are thread-safe.
34  * </ul>
35  *
36  * <p>Proxies may or may not allow advice changes to be made.
37  * If they do not permit advice changes (for example, because
38  * the configuration was frozen) a proxy should throw an
39  * {@link AopConfigException} on an attempted advice change.
40  *
41  * @author Rod Johnson
42  * @author Juergen Hoeller
43  */

44 public interface AopProxyFactory {
45
46     /**
47      * Create an {@link AopProxy} for the given AOP configuration.
48      * @param config the AOP configuration in the form of an
49      * AdvisedSupport object
50      * @return the corresponding AOP proxy
51      * @throws AopConfigException if the configuration is invalid
52      */

53     AopProxy createAopProxy(AdvisedSupport config) throws AopConfigException;
54
55 }
56
Popular Tags