1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package org.apache.fulcrum.yaafi.service.advice;
21
22 /**
23 * Simple service providing interceptor advices for ordinary POJOs. Since the
24 * implementation uses Dynamic Proxies only methods invoked by an interface
25 * can be advised.
26 *
27 * @author <a href="mailto:siegfried.goeschl@it20one.at">Siegfried Goeschl</a>
28 */
29
30 public interface AdviceService
31 {
32 /**
33 * Is the given object already adviced?
34 * @param object the object to check
35 * @return true if the object is an dynamic proxy
36 */
37 boolean isAdviced(Object object);
38
39 /**
40 * Advice the object with a the list of default AvalonInterceptorServices.
41 * @param object the object to be advised
42 * @return the advised object
43 */
44 Object advice(Object object);
45
46 /**
47 * Advice the object with a the list of default AvalonInterceptorServices.
48 * @param name the name of the object
49 * @param object the object to be advised
50 * @return the advised object
51 */
52 Object advice(String name, Object object);
53
54 /**
55 * Advice the object with a list of AvalonInterceptorServices.
56 * @param object the object to be advised
57 * @param interceptorList the list of service names
58 * @return the advised object
59 */
60 Object advice(String[] interceptorList, Object object );
61
62 /**
63 * Advice the object with a list of AvalonInterceptorServices.
64 * @param name the associated name of the object
65 * @param object the object to be advised
66 * @param interceptorList the list of service names
67 * @return the advised object
68 */
69 Object advice(String name, String[] interceptorList, Object object);
70 }