01: package org.objectweb.celtix.application;
02:
03: import org.objectweb.celtix.configuration.Configuration;
04: import org.objectweb.celtix.plugins.PluginManager;
05:
06: public final class Application {
07:
08: private static Application theInstance;
09:
10: private final Configuration configuration;
11: private final PluginManager pluginManager;
12:
13: private Application() {
14: pluginManager = new ApplicationPluginManager();
15: configuration = null;
16: }
17:
18: /**
19: * Returns the <code>Application</code> singleton.
20: *
21: * @return Application the application singleton.
22: */
23: public static Application getInstance() {
24: synchronized (Application.class) {
25: if (null == theInstance) {
26: theInstance = new Application();
27: }
28: }
29: return theInstance;
30: }
31:
32: /**
33: * Returns the <code>Configuration</code> of the <code>Application</code>.
34: *
35: * @return Configuration the configuration of the application.
36: */
37: public Configuration getConfiguration() {
38: return configuration;
39: }
40:
41: /**
42: * Returns the <code>PluginManager</code> of the <code>Application</code>.
43: *
44: * @return PluginManager the plugin manager of the application.
45: */
46: public PluginManager getPluginManager() {
47: return pluginManager;
48: }
49:
50: }
|