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.api.processor.MessageProcessor;
17 import org.mule.endpoint.EndpointURIEndpointBuilder;
18
19 import org.apache.commons.logging.Log;
20 import org.apache.commons.logging.LogFactory;
21 import org.springframework.beans.factory.FactoryBean;
22
23
24
25
26 public abstract class AbstractEndpointFactoryBean extends EndpointURIEndpointBuilder
27 implements FactoryBean, Initialisable
28 {
29
30 protected final Log logger = LogFactory.getLog(getClass());
31
32 public AbstractEndpointFactoryBean(EndpointURIEndpointBuilder global) throws EndpointException
33 {
34 super(global);
35 }
36
37 public AbstractEndpointFactoryBean()
38 {
39 super();
40 }
41
42 public Object getObject() throws Exception
43 {
44 return doGetObject();
45 }
46
47 public boolean isSingleton()
48 {
49 return true;
50 }
51
52 public void initialise() throws InitialisationException
53 {
54
55 }
56
57 protected abstract Object doGetObject() throws Exception;
58
59 }