1
2
3
4
5
6
7
8
9
10
11 package org.mule.config.spring.factories;
12
13 import org.mule.api.endpoint.EndpointException;
14 import org.mule.api.lifecycle.Initialisable;
15 import org.mule.api.lifecycle.InitialisationException;
16 import org.mule.endpoint.EndpointURIEndpointBuilder;
17
18 import org.apache.commons.logging.Log;
19 import org.apache.commons.logging.LogFactory;
20 import org.springframework.beans.factory.FactoryBean;
21
22
23
24
25 public abstract class AbstractEndpointFactoryBean extends EndpointURIEndpointBuilder
26 implements FactoryBean, Initialisable
27 {
28
29 protected final Log logger = LogFactory.getLog(getClass());
30
31 public AbstractEndpointFactoryBean(EndpointURIEndpointBuilder global) throws EndpointException
32 {
33 super(global);
34 }
35
36 public AbstractEndpointFactoryBean()
37 {
38 super();
39 }
40
41 public Object getObject() throws Exception
42 {
43 return doGetObject();
44 }
45
46 public boolean isSingleton()
47 {
48 return true;
49 }
50
51 public void initialise() throws InitialisationException
52 {
53
54 }
55
56 protected abstract Object doGetObject() throws Exception;
57
58 }