1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
package org.mule; |
11 | |
|
12 | |
import org.mule.api.MuleContext; |
13 | |
import org.mule.api.MuleException; |
14 | |
import org.mule.api.MuleRuntimeException; |
15 | |
import org.mule.api.client.LocalMuleClient; |
16 | |
import org.mule.api.config.MuleConfiguration; |
17 | |
import org.mule.api.config.MuleProperties; |
18 | |
import org.mule.api.config.ThreadingProfile; |
19 | |
import org.mule.api.context.MuleContextAware; |
20 | |
import org.mule.api.context.WorkManager; |
21 | |
import org.mule.api.context.notification.ServerNotification; |
22 | |
import org.mule.api.context.notification.ServerNotificationListener; |
23 | |
import org.mule.api.endpoint.EndpointFactory; |
24 | |
import org.mule.api.exception.SystemExceptionHandler; |
25 | |
import org.mule.api.expression.ExpressionManager; |
26 | |
import org.mule.api.lifecycle.Disposable; |
27 | |
import org.mule.api.lifecycle.Initialisable; |
28 | |
import org.mule.api.lifecycle.InitialisationException; |
29 | |
import org.mule.api.lifecycle.LifecycleManager; |
30 | |
import org.mule.api.lifecycle.Startable; |
31 | |
import org.mule.api.lifecycle.Stoppable; |
32 | |
import org.mule.api.registry.MuleRegistry; |
33 | |
import org.mule.api.registry.RegistrationException; |
34 | |
import org.mule.api.registry.Registry; |
35 | |
import org.mule.api.security.SecurityManager; |
36 | |
import org.mule.api.transaction.TransactionManagerFactory; |
37 | |
import org.mule.client.DefaultLocalMuleClient; |
38 | |
import org.mule.config.DefaultMuleConfiguration; |
39 | |
import org.mule.config.i18n.CoreMessages; |
40 | |
import org.mule.context.notification.MuleContextNotification; |
41 | |
import org.mule.context.notification.NotificationException; |
42 | |
import org.mule.context.notification.ServerNotificationManager; |
43 | |
import org.mule.exception.DefaultSystemExceptionStrategy; |
44 | |
import org.mule.expression.DefaultExpressionManager; |
45 | |
import org.mule.lifecycle.MuleContextLifecycleManager; |
46 | |
import org.mule.management.stats.AllStatistics; |
47 | |
import org.mule.registry.DefaultRegistryBroker; |
48 | |
import org.mule.registry.MuleRegistryHelper; |
49 | |
import org.mule.util.ApplicationShutdownSplashScreen; |
50 | |
import org.mule.util.ApplicationStartupSplashScreen; |
51 | |
import org.mule.util.ServerShutdownSplashScreen; |
52 | |
import org.mule.util.ServerStartupSplashScreen; |
53 | |
import org.mule.util.SplashScreen; |
54 | |
import org.mule.util.queue.QueueManager; |
55 | |
|
56 | |
import java.util.Collection; |
57 | |
|
58 | |
import javax.resource.spi.work.WorkListener; |
59 | |
import javax.transaction.TransactionManager; |
60 | |
|
61 | |
import org.apache.commons.logging.Log; |
62 | |
import org.apache.commons.logging.LogFactory; |
63 | |
|
64 | |
public class DefaultMuleContext implements MuleContext |
65 | |
{ |
66 | |
|
67 | |
|
68 | |
|
69 | 0 | private transient Log logger = LogFactory.getLog(DefaultMuleContext.class); |
70 | |
|
71 | |
|
72 | |
|
73 | |
|
74 | |
private DefaultRegistryBroker registryBroker; |
75 | |
|
76 | |
|
77 | |
|
78 | |
|
79 | |
private MuleRegistry muleRegistryHelper; |
80 | |
|
81 | |
|
82 | |
|
83 | |
|
84 | 0 | private AllStatistics stats = new AllStatistics(); |
85 | |
|
86 | |
private WorkManager workManager; |
87 | |
|
88 | |
private WorkListener workListener; |
89 | |
|
90 | |
|
91 | |
|
92 | |
|
93 | |
|
94 | |
protected MuleContextLifecycleManager lifecycleManager; |
95 | |
|
96 | |
protected ServerNotificationManager notificationManager; |
97 | |
|
98 | |
private MuleConfiguration config; |
99 | |
|
100 | |
|
101 | |
|
102 | |
|
103 | |
private long startDate; |
104 | |
|
105 | |
private ExpressionManager expressionManager; |
106 | |
|
107 | |
private ClassLoader executionClassLoader; |
108 | |
|
109 | |
protected LocalMuleClient localMuleClient; |
110 | |
|
111 | |
|
112 | |
protected SystemExceptionHandler exceptionListener; |
113 | |
|
114 | |
public DefaultMuleContext(MuleConfiguration config, |
115 | |
WorkManager workManager, |
116 | |
WorkListener workListener, |
117 | |
MuleContextLifecycleManager lifecycleManager, |
118 | |
ServerNotificationManager notificationManager) |
119 | 0 | { |
120 | 0 | this.config = config; |
121 | 0 | ((MuleContextAware) config).setMuleContext(this); |
122 | 0 | this.workManager = workManager; |
123 | 0 | this.workListener = workListener; |
124 | 0 | this.lifecycleManager = lifecycleManager; |
125 | 0 | this.notificationManager = notificationManager; |
126 | 0 | this.notificationManager.setMuleContext(this); |
127 | |
|
128 | 0 | this.expressionManager = new DefaultExpressionManager(); |
129 | 0 | ((MuleContextAware) this.expressionManager).setMuleContext(this); |
130 | 0 | registryBroker = createRegistryBroker(); |
131 | 0 | muleRegistryHelper = createRegistryHelper(registryBroker); |
132 | 0 | localMuleClient = new DefaultLocalMuleClient(this); |
133 | 0 | exceptionListener = new DefaultSystemExceptionStrategy(this); |
134 | 0 | } |
135 | |
|
136 | |
protected DefaultRegistryBroker createRegistryBroker() |
137 | |
{ |
138 | 0 | return new DefaultRegistryBroker(this); |
139 | |
} |
140 | |
|
141 | |
protected MuleRegistry createRegistryHelper(DefaultRegistryBroker registry) |
142 | |
{ |
143 | 0 | return new MuleRegistryHelper(registry, this); |
144 | |
} |
145 | |
|
146 | |
public synchronized void initialise() throws InitialisationException |
147 | |
{ |
148 | 0 | lifecycleManager.checkPhase(Initialisable.PHASE_NAME); |
149 | |
|
150 | 0 | if (getNotificationManager() == null) |
151 | |
{ |
152 | 0 | throw new MuleRuntimeException( |
153 | |
CoreMessages.objectIsNull(MuleProperties.OBJECT_NOTIFICATION_MANAGER)); |
154 | |
} |
155 | 0 | if (workManager == null) |
156 | |
{ |
157 | 0 | throw new MuleRuntimeException(CoreMessages.objectIsNull("workManager")); |
158 | |
} |
159 | |
|
160 | |
try |
161 | |
{ |
162 | |
|
163 | |
|
164 | 0 | muleRegistryHelper.initialise(); |
165 | |
|
166 | |
|
167 | 0 | if (workManager instanceof MuleContextAware) |
168 | |
{ |
169 | 0 | MuleContextAware contextAware = (MuleContextAware) workManager; |
170 | 0 | contextAware.setMuleContext(this); |
171 | |
} |
172 | |
|
173 | 0 | workManager.start(); |
174 | 0 | getNotificationManager().start(workManager, workListener); |
175 | 0 | fireNotification(new MuleContextNotification(this, MuleContextNotification.CONTEXT_INITIALISING)); |
176 | 0 | getLifecycleManager().fireLifecycle(Initialisable.PHASE_NAME); |
177 | |
|
178 | 0 | fireNotification(new MuleContextNotification(this, MuleContextNotification.CONTEXT_INITIALISED)); |
179 | |
} |
180 | 0 | catch (Exception e) |
181 | |
{ |
182 | 0 | throw new InitialisationException(e, this); |
183 | 0 | } |
184 | 0 | } |
185 | |
|
186 | |
public synchronized void start() throws MuleException |
187 | |
{ |
188 | 0 | getLifecycleManager().checkPhase(Startable.PHASE_NAME); |
189 | |
|
190 | 0 | if (getSecurityManager() == null) |
191 | |
{ |
192 | 0 | throw new MuleRuntimeException(CoreMessages.objectIsNull("securityManager")); |
193 | |
} |
194 | 0 | if (getQueueManager() == null) |
195 | |
{ |
196 | 0 | throw new MuleRuntimeException(CoreMessages.objectIsNull("queueManager")); |
197 | |
} |
198 | |
|
199 | 0 | startDate = System.currentTimeMillis(); |
200 | |
|
201 | 0 | fireNotification(new MuleContextNotification(this, MuleContextNotification.CONTEXT_STARTING)); |
202 | 0 | getLifecycleManager().fireLifecycle(Startable.PHASE_NAME); |
203 | |
|
204 | |
|
205 | 0 | fireNotification(new MuleContextNotification(this, MuleContextNotification.CONTEXT_STARTED)); |
206 | |
|
207 | 0 | if (logger.isInfoEnabled()) |
208 | |
{ |
209 | 0 | SplashScreen startupScreen = buildStartupSplash(); |
210 | 0 | logger.info(startupScreen.toString()); |
211 | |
} |
212 | 0 | } |
213 | |
|
214 | |
|
215 | |
|
216 | |
|
217 | |
|
218 | |
|
219 | |
|
220 | |
public synchronized void stop() throws MuleException |
221 | |
{ |
222 | 0 | getLifecycleManager().checkPhase(Stoppable.PHASE_NAME); |
223 | 0 | fireNotification(new MuleContextNotification(this, MuleContextNotification.CONTEXT_STOPPING)); |
224 | 0 | getLifecycleManager().fireLifecycle(Stoppable.PHASE_NAME); |
225 | 0 | fireNotification(new MuleContextNotification(this, MuleContextNotification.CONTEXT_STOPPED)); |
226 | 0 | } |
227 | |
|
228 | |
public synchronized void dispose() |
229 | |
{ |
230 | 0 | if (isStarted()) |
231 | |
{ |
232 | |
try |
233 | |
{ |
234 | 0 | stop(); |
235 | |
} |
236 | 0 | catch (MuleException e) |
237 | |
{ |
238 | 0 | logger.error("Failed to stop Mule context", e); |
239 | 0 | } |
240 | |
} |
241 | |
|
242 | 0 | getLifecycleManager().checkPhase(Disposable.PHASE_NAME); |
243 | |
|
244 | 0 | fireNotification(new MuleContextNotification(this, MuleContextNotification.CONTEXT_DISPOSING)); |
245 | |
|
246 | |
try |
247 | |
{ |
248 | 0 | getLifecycleManager().fireLifecycle(Disposable.PHASE_NAME); |
249 | |
|
250 | |
|
251 | 0 | muleRegistryHelper.dispose(); |
252 | |
} |
253 | 0 | catch (Exception e) |
254 | |
{ |
255 | 0 | logger.debug("Failed to cleanly dispose Mule: " + e.getMessage(), e); |
256 | 0 | } |
257 | |
|
258 | 0 | notificationManager.fireNotification(new MuleContextNotification(this, MuleContextNotification.CONTEXT_DISPOSED)); |
259 | |
|
260 | 0 | notificationManager.dispose(); |
261 | 0 | workManager.dispose(); |
262 | |
|
263 | 0 | if ((getStartDate() > 0) && logger.isInfoEnabled()) |
264 | |
{ |
265 | 0 | SplashScreen shutdownScreen = buildShutdownSplash(); |
266 | 0 | logger.info(shutdownScreen.toString()); |
267 | |
} |
268 | |
|
269 | |
|
270 | |
|
271 | 0 | setExecutionClassLoader(null); |
272 | 0 | } |
273 | |
|
274 | |
|
275 | |
|
276 | |
|
277 | |
|
278 | |
|
279 | |
public boolean isInitialised() |
280 | |
{ |
281 | 0 | return getLifecycleManager().getState().isInitialised(); |
282 | |
} |
283 | |
|
284 | |
|
285 | |
|
286 | |
|
287 | |
|
288 | |
|
289 | |
public boolean isInitialising() |
290 | |
{ |
291 | 0 | return getLifecycleManager().getState().isInitialising(); |
292 | |
} |
293 | |
|
294 | |
public boolean isStopped() |
295 | |
{ |
296 | 0 | return getLifecycleManager().getState().isStopped(); |
297 | |
} |
298 | |
|
299 | |
public boolean isStopping() |
300 | |
{ |
301 | 0 | return getLifecycleManager().getState().isStopping(); |
302 | |
} |
303 | |
|
304 | |
|
305 | |
|
306 | |
|
307 | |
|
308 | |
|
309 | |
public boolean isStarted() |
310 | |
{ |
311 | 0 | return getLifecycleManager().isPhaseComplete(Startable.PHASE_NAME); |
312 | |
} |
313 | |
|
314 | |
public boolean isStarting() |
315 | |
{ |
316 | 0 | return getLifecycleManager().getState().isStarting(); |
317 | |
} |
318 | |
|
319 | |
public boolean isDisposed() |
320 | |
{ |
321 | 0 | return getLifecycleManager().getState().isDisposed(); |
322 | |
} |
323 | |
|
324 | |
public boolean isDisposing() |
325 | |
{ |
326 | 0 | return getLifecycleManager().getState().isDisposing(); |
327 | |
} |
328 | |
|
329 | |
public LifecycleManager getLifecycleManager() |
330 | |
{ |
331 | 0 | return lifecycleManager; |
332 | |
} |
333 | |
|
334 | |
|
335 | |
|
336 | |
|
337 | |
|
338 | |
|
339 | |
public AllStatistics getStatistics() |
340 | |
{ |
341 | 0 | return stats; |
342 | |
} |
343 | |
|
344 | |
public void registerListener(ServerNotificationListener l) throws NotificationException |
345 | |
{ |
346 | 0 | registerListener(l, null); |
347 | 0 | } |
348 | |
|
349 | |
public void registerListener(ServerNotificationListener l, String resourceIdentifier) throws NotificationException |
350 | |
{ |
351 | 0 | ServerNotificationManager notificationManager = getNotificationManager(); |
352 | 0 | if (notificationManager == null) |
353 | |
{ |
354 | 0 | throw new MuleRuntimeException(CoreMessages.serverNotificationManagerNotEnabled()); |
355 | |
} |
356 | 0 | notificationManager.addListenerSubscription(l, resourceIdentifier); |
357 | 0 | } |
358 | |
|
359 | |
public void unregisterListener(ServerNotificationListener l) |
360 | |
{ |
361 | 0 | ServerNotificationManager notificationManager = getNotificationManager(); |
362 | 0 | if (notificationManager != null) |
363 | |
{ |
364 | 0 | notificationManager.removeListener(l); |
365 | |
} |
366 | 0 | } |
367 | |
|
368 | |
|
369 | |
|
370 | |
|
371 | |
|
372 | |
|
373 | |
|
374 | |
|
375 | |
|
376 | |
|
377 | |
|
378 | |
public void fireNotification(ServerNotification notification) |
379 | |
{ |
380 | 0 | ServerNotificationManager notificationManager = getNotificationManager(); |
381 | 0 | if (notificationManager != null) |
382 | |
{ |
383 | 0 | notificationManager.fireNotification(notification); |
384 | |
} |
385 | 0 | else if (logger.isDebugEnabled()) |
386 | |
{ |
387 | 0 | logger.debug("MuleEvent Manager is not enabled, ignoring notification: " + notification); |
388 | |
} |
389 | 0 | } |
390 | |
|
391 | |
|
392 | |
|
393 | |
|
394 | |
|
395 | |
|
396 | |
|
397 | |
|
398 | |
|
399 | |
public void setSecurityManager(SecurityManager securityManager) throws RegistrationException |
400 | |
{ |
401 | 0 | checkLifecycleForPropertySet(MuleProperties.OBJECT_SECURITY_MANAGER, Initialisable.PHASE_NAME); |
402 | 0 | registryBroker.registerObject(MuleProperties.OBJECT_SECURITY_MANAGER, securityManager); |
403 | 0 | } |
404 | |
|
405 | |
|
406 | |
|
407 | |
|
408 | |
|
409 | |
|
410 | |
|
411 | |
|
412 | |
|
413 | |
public SecurityManager getSecurityManager() |
414 | |
{ |
415 | 0 | SecurityManager securityManager = (SecurityManager) registryBroker.lookupObject(MuleProperties.OBJECT_SECURITY_MANAGER); |
416 | 0 | if (securityManager == null) |
417 | |
{ |
418 | 0 | Collection temp = registryBroker.lookupObjects(SecurityManager.class); |
419 | 0 | if (temp.size() > 0) |
420 | |
{ |
421 | 0 | securityManager = ((SecurityManager) temp.iterator().next()); |
422 | |
} |
423 | |
} |
424 | 0 | return securityManager; |
425 | |
} |
426 | |
|
427 | |
|
428 | |
|
429 | |
|
430 | |
|
431 | |
|
432 | |
|
433 | |
|
434 | |
|
435 | |
|
436 | |
|
437 | |
|
438 | |
|
439 | |
|
440 | |
|
441 | |
|
442 | |
|
443 | |
|
444 | |
public WorkManager getWorkManager() |
445 | |
{ |
446 | 0 | return workManager; |
447 | |
} |
448 | |
|
449 | |
public WorkListener getWorkListener() |
450 | |
{ |
451 | 0 | return workListener; |
452 | |
} |
453 | |
|
454 | |
public QueueManager getQueueManager() |
455 | |
{ |
456 | 0 | QueueManager queueManager = (QueueManager) registryBroker.lookupObject(MuleProperties.OBJECT_QUEUE_MANAGER); |
457 | 0 | if (queueManager == null) |
458 | |
{ |
459 | 0 | Collection temp = registryBroker.lookupObjects(QueueManager.class); |
460 | 0 | if (temp.size() > 0) |
461 | |
{ |
462 | 0 | queueManager = ((QueueManager) temp.iterator().next()); |
463 | |
} |
464 | |
} |
465 | 0 | return queueManager; |
466 | |
} |
467 | |
|
468 | |
public void setQueueManager(QueueManager queueManager) throws RegistrationException |
469 | |
{ |
470 | 0 | checkLifecycleForPropertySet(MuleProperties.OBJECT_QUEUE_MANAGER, Initialisable.PHASE_NAME); |
471 | 0 | registryBroker.registerObject(MuleProperties.OBJECT_QUEUE_MANAGER, queueManager); |
472 | 0 | } |
473 | |
|
474 | |
|
475 | |
|
476 | |
|
477 | |
|
478 | |
public MuleConfiguration getConfiguration() |
479 | |
{ |
480 | |
|
481 | 0 | return config; |
482 | |
|
483 | |
} |
484 | |
|
485 | |
public ServerNotificationManager getNotificationManager() |
486 | |
{ |
487 | 0 | return notificationManager; |
488 | |
} |
489 | |
|
490 | |
|
491 | |
|
492 | |
|
493 | |
|
494 | |
|
495 | |
|
496 | |
public void setTransactionManager(TransactionManager manager) throws RegistrationException |
497 | |
{ |
498 | |
|
499 | 0 | registryBroker.registerObject(MuleProperties.OBJECT_TRANSACTION_MANAGER, manager); |
500 | 0 | } |
501 | |
|
502 | |
|
503 | |
|
504 | |
|
505 | |
|
506 | |
|
507 | |
|
508 | |
|
509 | |
public TransactionManager getTransactionManager() |
510 | |
{ |
511 | 0 | TransactionManager transactionManager = (TransactionManager) registryBroker.lookupObject(MuleProperties.OBJECT_TRANSACTION_MANAGER); |
512 | 0 | if (transactionManager == null) |
513 | |
{ |
514 | 0 | Collection temp = registryBroker.lookupObjects(TransactionManagerFactory.class); |
515 | 0 | if (temp.size() > 0) |
516 | |
{ |
517 | |
try |
518 | |
{ |
519 | 0 | transactionManager = (((TransactionManagerFactory) temp.iterator().next()).create(config)); |
520 | |
} |
521 | 0 | catch (Exception e) |
522 | |
{ |
523 | 0 | throw new MuleRuntimeException(CoreMessages.failedToCreate("transaction manager"), e); |
524 | 0 | } |
525 | |
} |
526 | |
else |
527 | |
{ |
528 | 0 | temp = registryBroker.lookupObjects(TransactionManager.class); |
529 | 0 | if (temp.size() > 0) |
530 | |
{ |
531 | 0 | transactionManager = (((TransactionManager) temp.iterator().next())); |
532 | |
} |
533 | |
} |
534 | |
} |
535 | 0 | return transactionManager; |
536 | |
} |
537 | |
|
538 | |
protected void checkLifecycleForPropertySet(String propertyName, String phase) throws IllegalStateException |
539 | |
{ |
540 | 0 | if (lifecycleManager.isPhaseComplete(phase)) |
541 | |
{ |
542 | 0 | throw new IllegalStateException("Cannot set property: '" + propertyName + "' once the server has been gone through the " + phase + " phase."); |
543 | |
} |
544 | 0 | } |
545 | |
|
546 | |
public MuleRegistry getRegistry() |
547 | |
{ |
548 | 0 | return muleRegistryHelper; |
549 | |
} |
550 | |
|
551 | |
public ThreadingProfile getDefaultMessageDispatcherThreadingProfile() |
552 | |
{ |
553 | 0 | return (ThreadingProfile) getRegistry().lookupObject(MuleProperties.OBJECT_DEFAULT_MESSAGE_DISPATCHER_THREADING_PROFILE); |
554 | |
} |
555 | |
|
556 | |
public ThreadingProfile getDefaultMessageRequesterThreadingProfile() |
557 | |
{ |
558 | 0 | return (ThreadingProfile) getRegistry().lookupObject(MuleProperties.OBJECT_DEFAULT_MESSAGE_REQUESTER_THREADING_PROFILE); |
559 | |
} |
560 | |
|
561 | |
public ThreadingProfile getDefaultMessageReceiverThreadingProfile() |
562 | |
{ |
563 | 0 | return (ThreadingProfile) getRegistry().lookupObject(MuleProperties.OBJECT_DEFAULT_MESSAGE_RECEIVER_THREADING_PROFILE); |
564 | |
} |
565 | |
|
566 | |
public ThreadingProfile getDefaultServiceThreadingProfile() |
567 | |
{ |
568 | 0 | return (ThreadingProfile) getRegistry().lookupObject(MuleProperties.OBJECT_DEFAULT_SERVICE_THREADING_PROFILE); |
569 | |
} |
570 | |
|
571 | |
public ThreadingProfile getDefaultThreadingProfile() |
572 | |
{ |
573 | 0 | return (ThreadingProfile) getRegistry().lookupObject(MuleProperties.OBJECT_DEFAULT_THREADING_PROFILE); |
574 | |
} |
575 | |
|
576 | |
|
577 | |
|
578 | |
|
579 | |
|
580 | |
|
581 | |
public long getStartDate() |
582 | |
{ |
583 | 0 | return startDate; |
584 | |
} |
585 | |
|
586 | |
|
587 | |
|
588 | |
|
589 | |
|
590 | |
|
591 | |
|
592 | |
public ExpressionManager getExpressionManager() |
593 | |
{ |
594 | 0 | return expressionManager; |
595 | |
} |
596 | |
|
597 | |
public void setExecutionClassLoader(ClassLoader cl) |
598 | |
{ |
599 | 0 | this.executionClassLoader = cl; |
600 | 0 | } |
601 | |
|
602 | |
public ClassLoader getExecutionClassLoader() |
603 | |
{ |
604 | 0 | return executionClassLoader; |
605 | |
} |
606 | |
|
607 | |
public void addRegistry(Registry registry) |
608 | |
{ |
609 | 0 | registryBroker.addRegistry(registry); |
610 | 0 | } |
611 | |
|
612 | |
public void removeRegistry(Registry registry) |
613 | |
{ |
614 | 0 | registryBroker.removeRegistry(registry); |
615 | 0 | } |
616 | |
|
617 | |
protected SplashScreen buildStartupSplash() |
618 | |
{ |
619 | 0 | SplashScreen startupScreen = config.isContainerMode() |
620 | |
? new ApplicationStartupSplashScreen() |
621 | |
: new ServerStartupSplashScreen(); |
622 | 0 | startupScreen.setHeader(this); |
623 | 0 | startupScreen.setFooter(this); |
624 | 0 | return startupScreen; |
625 | |
} |
626 | |
|
627 | |
protected SplashScreen buildShutdownSplash() |
628 | |
{ |
629 | 0 | SplashScreen shutdownScreen = config.isContainerMode() |
630 | |
? new ApplicationShutdownSplashScreen() |
631 | |
: new ServerShutdownSplashScreen(); |
632 | 0 | shutdownScreen.setHeader(this); |
633 | 0 | return shutdownScreen; |
634 | |
} |
635 | |
|
636 | |
public LocalMuleClient getClient() |
637 | |
{ |
638 | 0 | return localMuleClient; |
639 | |
} |
640 | |
|
641 | |
public SystemExceptionHandler getExceptionListener() |
642 | |
{ |
643 | 0 | return exceptionListener; |
644 | |
} |
645 | |
|
646 | |
public void setExceptionListener(SystemExceptionHandler exceptionListener) |
647 | |
{ |
648 | 0 | this.exceptionListener = exceptionListener; |
649 | 0 | } |
650 | |
|
651 | |
public EndpointFactory getEndpointFactory() |
652 | |
{ |
653 | 0 | return (EndpointFactory) registryBroker.lookupObject(MuleProperties.OBJECT_MULE_ENDPOINT_FACTORY); |
654 | |
} |
655 | |
} |