1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
package org.mule.extras.spring.config; |
12 | |
|
13 | |
import org.mule.MuleManager; |
14 | |
import org.mule.config.MuleConfiguration; |
15 | |
import org.mule.config.PoolingProfile; |
16 | |
import org.mule.config.QueueProfile; |
17 | |
import org.mule.config.ThreadingProfile; |
18 | |
|
19 | |
import org.springframework.beans.factory.FactoryBean; |
20 | |
|
21 | |
|
22 | |
|
23 | |
|
24 | |
|
25 | |
|
26 | |
|
27 | |
|
28 | |
|
29 | |
|
30 | 0 | public class MuleConfigurationFactoryBean implements FactoryBean |
31 | |
{ |
32 | 0 | private final MuleConfiguration muleConfiguration = MuleManager.getConfiguration(); |
33 | |
|
34 | |
public Object getObject() throws Exception |
35 | |
{ |
36 | 0 | return muleConfiguration; |
37 | |
} |
38 | |
|
39 | |
public Class getObjectType() |
40 | |
{ |
41 | 0 | return MuleConfiguration.class; |
42 | |
} |
43 | |
|
44 | |
public boolean isSingleton() |
45 | |
{ |
46 | 0 | return true; |
47 | |
} |
48 | |
|
49 | |
public boolean isSynchronous() |
50 | |
{ |
51 | 0 | return muleConfiguration.isSynchronous(); |
52 | |
} |
53 | |
|
54 | |
public void setSynchronous(boolean synchronous) |
55 | |
{ |
56 | 0 | muleConfiguration.setSynchronous(synchronous); |
57 | 0 | } |
58 | |
|
59 | |
public String getModel() |
60 | |
{ |
61 | 0 | return muleConfiguration.getModel(); |
62 | |
} |
63 | |
|
64 | |
public void setModel(String model) |
65 | |
{ |
66 | 0 | muleConfiguration.setModel(model); |
67 | 0 | } |
68 | |
|
69 | |
public ThreadingProfile getMessageDispatcherThreadingProfile() |
70 | |
{ |
71 | 0 | return muleConfiguration.getMessageDispatcherThreadingProfile(); |
72 | |
} |
73 | |
|
74 | |
public void setMessageDispatcherThreadingProfile(ThreadingProfile messageDispatcherThreadingProfile) |
75 | |
{ |
76 | 0 | muleConfiguration.setMessageDispatcherThreadingProfile(messageDispatcherThreadingProfile); |
77 | 0 | } |
78 | |
|
79 | |
public ThreadingProfile getMessageReceiverThreadingProfile() |
80 | |
{ |
81 | 0 | return muleConfiguration.getMessageReceiverThreadingProfile(); |
82 | |
} |
83 | |
|
84 | |
public void setMessageReceiverThreadingProfile(ThreadingProfile messageReceiverThreadingProfile) |
85 | |
{ |
86 | 0 | muleConfiguration.setMessageReceiverThreadingProfile(messageReceiverThreadingProfile); |
87 | 0 | } |
88 | |
|
89 | |
public ThreadingProfile getComponentThreadingProfile() |
90 | |
{ |
91 | 0 | return muleConfiguration.getComponentThreadingProfile(); |
92 | |
} |
93 | |
|
94 | |
public void setComponentThreadingProfile(ThreadingProfile componentPoolThreadingProfile) |
95 | |
{ |
96 | 0 | muleConfiguration.setComponentThreadingProfile(componentPoolThreadingProfile); |
97 | 0 | } |
98 | |
|
99 | |
public ThreadingProfile getDefaultThreadingProfile() |
100 | |
{ |
101 | 0 | return muleConfiguration.getDefaultThreadingProfile(); |
102 | |
} |
103 | |
|
104 | |
public void setDefaultThreadingProfile(ThreadingProfile defaultThreadingProfile) |
105 | |
{ |
106 | 0 | muleConfiguration.setDefaultThreadingProfile(defaultThreadingProfile); |
107 | 0 | } |
108 | |
|
109 | |
public PoolingProfile getPoolingProfile() |
110 | |
{ |
111 | 0 | return muleConfiguration.getPoolingProfile(); |
112 | |
} |
113 | |
|
114 | |
public void setPoolingProfile(PoolingProfile poolingProfile) |
115 | |
{ |
116 | 0 | muleConfiguration.setPoolingProfile(poolingProfile); |
117 | 0 | } |
118 | |
|
119 | |
public int getSynchronousEventTimeout() |
120 | |
{ |
121 | 0 | return muleConfiguration.getSynchronousEventTimeout(); |
122 | |
} |
123 | |
|
124 | |
public void setSynchronousEventTimeout(int synchronousEventTimeout) |
125 | |
{ |
126 | 0 | muleConfiguration.setSynchronousEventTimeout(synchronousEventTimeout); |
127 | 0 | } |
128 | |
|
129 | |
public boolean isSynchronousReceive() |
130 | |
{ |
131 | 0 | return muleConfiguration.isRemoteSync(); |
132 | |
} |
133 | |
|
134 | |
public void setSynchronousReceive(boolean synchronousReceive) |
135 | |
{ |
136 | 0 | muleConfiguration.setRemoteSync(synchronousReceive); |
137 | 0 | } |
138 | |
|
139 | |
public QueueProfile getQueueProfile() |
140 | |
{ |
141 | 0 | return muleConfiguration.getQueueProfile(); |
142 | |
} |
143 | |
|
144 | |
public void setQueueProfile(QueueProfile queueProfile) |
145 | |
{ |
146 | 0 | muleConfiguration.setQueueProfile(queueProfile); |
147 | 0 | } |
148 | |
|
149 | |
public boolean isRecoverableMode() |
150 | |
{ |
151 | 0 | return muleConfiguration.isRecoverableMode(); |
152 | |
} |
153 | |
|
154 | |
public void setRecoverableMode(boolean recoverableMode) |
155 | |
{ |
156 | 0 | muleConfiguration.setRecoverableMode(recoverableMode); |
157 | 0 | } |
158 | |
|
159 | |
public String getWorkingDirectory() |
160 | |
{ |
161 | 0 | return muleConfiguration.getWorkingDirectory(); |
162 | |
} |
163 | |
|
164 | |
public void setWorkingDirectory(String workingDirectory) |
165 | |
{ |
166 | 0 | muleConfiguration.setWorkingDirectory(workingDirectory); |
167 | 0 | } |
168 | |
|
169 | |
public String[] getConfigResources() |
170 | |
{ |
171 | 0 | return muleConfiguration.getConfigResources(); |
172 | |
} |
173 | |
|
174 | |
public void setConfigResources(String[] configResources) |
175 | |
{ |
176 | 0 | muleConfiguration.setConfigResources(configResources); |
177 | 0 | } |
178 | |
|
179 | |
public String getServerUrl() |
180 | |
{ |
181 | 0 | return muleConfiguration.getServerUrl(); |
182 | |
} |
183 | |
|
184 | |
public void setServerUrl(String serverUrl) |
185 | |
{ |
186 | 0 | muleConfiguration.setServerUrl(serverUrl); |
187 | 0 | } |
188 | |
} |