1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
package org.mule.config.spring.processors; |
11 | |
|
12 | |
import org.mule.api.MuleContext; |
13 | |
import org.mule.api.context.MuleContextAware; |
14 | |
import org.mule.api.service.Service; |
15 | |
import org.mule.config.processors.DecoratingAnnotatedServiceProcessor; |
16 | |
|
17 | |
import org.springframework.beans.BeansException; |
18 | |
import org.springframework.beans.factory.config.BeanPostProcessor; |
19 | |
|
20 | |
|
21 | |
|
22 | |
|
23 | 0 | public class DecoratingFlowAnnotationsBeanProcessor implements BeanPostProcessor, MuleContextAware |
24 | |
{ |
25 | |
private DecoratingAnnotatedServiceProcessor processor; |
26 | |
|
27 | |
public void setMuleContext(MuleContext muleContext) |
28 | |
{ |
29 | 0 | processor = new DecoratingAnnotatedServiceProcessor(muleContext); |
30 | 0 | } |
31 | |
|
32 | |
public Object postProcessBeforeInitialization(java.lang.Object o, java.lang.String s) throws BeansException |
33 | |
{ |
34 | 0 | if(o instanceof Service) |
35 | |
{ |
36 | 0 | return processor.process(o); |
37 | |
} |
38 | 0 | return o; |
39 | |
} |
40 | |
|
41 | |
|
42 | |
public Object postProcessAfterInitialization(java.lang.Object o, java.lang.String s) throws BeansException |
43 | |
{ |
44 | 0 | return o; |
45 | |
} |
46 | |
} |