KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > celtix > application > Application


1 package org.objectweb.celtix.application;
2
3 import org.objectweb.celtix.configuration.Configuration;
4 import org.objectweb.celtix.plugins.PluginManager;
5
6 public final class Application {
7     
8     private static Application theInstance;
9     
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 }
51
Popular Tags