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