KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > mule > extras > spring > config > MuleConfigurationFactoryBean


1 /*
2  * $Id: MuleConfigurationFactoryBean.java 3798 2006-11-04 04:07:14Z aperepel $
3  * --------------------------------------------------------------------------------------
4  * Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.com
5  *
6  * The software in this package is published under the terms of the MuleSource MPL
7  * license, a copy of which has been included with this distribution in the
8  * LICENSE.txt file.
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 import org.springframework.beans.factory.FactoryBean;
19
20 /**
21  * <code>MuleConfigurationFactoryBean</code> is used to configure the MuleManager
22  * object. This is not necessary if you use the AutowireUMOManagerFactoryBean as it
23  * handles creating the MuleConfiguration correctly for you.
24  *
25  * @deprecated use AutowireUMOManagerFactoryBean instead
26  * @see AutowireUMOManagerFactoryBean
27  */

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