KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > enhydra > admin > SimpleCacheAdmin


1 /*
2  * SimpleCacheAdmin
3  *
4  * Enhydra super-servlet
5  *
6  */

7
8 package org.enhydra.admin;
9
10 import com.lutris.appserver.server.*;
11 import com.lutris.appserver.server.httpPresentation.*;
12 import com.lutris.appserver.server.session.*;
13 import com.lutris.util.*;
14 import com.lutris.logging.Logger;
15
16 import org.enhydra.admin.spec.business.*;
17
18 /**
19  * The application object.
20  *
21  * Application-wide data would go here.
22  */

23 public class SimpleCacheAdmin extends StandardApplication {
24         
25         public MBeanTrigger mBeanTrigger = null;
26     /*
27      * A few methods you might want to add to.
28      * See StandardApplication for more details.
29      */

30     public void startup(Config appConfig) throws ApplicationException {
31         super.startup(appConfig);
32         mBeanTrigger = MBeanTriggerFactory.createMBeanTrigger();
33         if (logChannel != null) {
34             logChannel.write(Logger.INFO,
35                              "Welcome to the Simple Cache Admin application!");
36         }
37         // Here is where you would read application-specific settings from
38
// your config file.
39
}
40     public boolean requestPreprocessor(HttpPresentationComms comms)
41                    throws Exception JavaDoc {
42         return super.requestPreprocessor(comms);
43     }
44
45     /**
46      * This is an optional function, used only by the Multiserver's graphical
47      * administration. This bit of HTML appears in the status page for this
48      * application. You could add extra status info, for example
49      * a list of currently logged in users.
50      *
51      * @return HTML that is displayed in the status page of the Multiserver.
52      */

53     public String JavaDoc toHtml() {
54         return "This is <I>SimpleCacheAdmin</I>";
55     }
56 }
57
58
Popular Tags