1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
package org.mule.config.spring.factories; |
12 | |
|
13 | |
import org.mule.api.config.ConfigurationException; |
14 | |
import org.mule.api.endpoint.EndpointException; |
15 | |
import org.mule.api.endpoint.EndpointFactory; |
16 | |
import org.mule.api.endpoint.InboundEndpoint; |
17 | |
import org.mule.config.i18n.MessageFactory; |
18 | |
import org.mule.endpoint.EndpointURIEndpointBuilder; |
19 | |
|
20 | |
|
21 | |
|
22 | |
|
23 | |
public class InboundEndpointFactoryBean extends AbstractEndpointFactoryBean |
24 | |
{ |
25 | |
|
26 | |
public InboundEndpointFactoryBean(EndpointURIEndpointBuilder global) throws EndpointException |
27 | |
{ |
28 | 0 | super(global); |
29 | 0 | } |
30 | |
|
31 | |
public InboundEndpointFactoryBean() |
32 | |
{ |
33 | 0 | super(); |
34 | 0 | } |
35 | |
|
36 | |
public Class getObjectType() |
37 | |
{ |
38 | 0 | return InboundEndpoint.class; |
39 | |
} |
40 | |
|
41 | |
public Object doGetObject() throws Exception |
42 | |
{ |
43 | 0 | EndpointFactory ef = muleContext.getRegistry().lookupEndpointFactory(); |
44 | 0 | if (ef != null) |
45 | |
{ |
46 | 0 | return ef.getInboundEndpoint(this); |
47 | |
} |
48 | |
else |
49 | |
{ |
50 | 0 | throw new ConfigurationException(MessageFactory.createStaticMessage("EndpointFactory not found in Registry")); |
51 | |
} |
52 | |
} |
53 | |
|
54 | |
} |