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