KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > petals > engine > clock > ClockBootstrapImpl


1 package org.objectweb.petals.engine.clock;
2
3 import javax.jbi.JBIException;
4 import javax.jbi.component.Bootstrap;
5 import javax.jbi.component.InstallationContext;
6 import javax.management.ObjectName JavaDoc;
7
8 /**
9  *
10  * @author ofabre
11  *
12  */

13 public class ClockBootstrapImpl implements Bootstrap{
14     
15     private InstallationContext ctx;
16     
17     public void cleanUp() throws JBIException {
18         System.out.println("Bootstrap called to clean up allocated ressources.");
19         System.out.println("Cleaning the Installation context");
20         ctx = null;
21     }
22
23     public ObjectName JavaDoc getExtensionMBeanName() {
24         System.out.println("Bootstrap called to get ExtensionMBeanName.");
25         return null;
26     }
27
28     public void init(InstallationContext installContext) throws JBIException {
29         System.out.println("Bootstrap instance initiated.");
30         ctx = installContext;
31
32     }
33
34     public void onInstall() throws JBIException {
35         System.out.println("Bootstrap instance installed.");
36         System.out.println("Installation = "+ctx.isInstall());
37         System.out.println(ctx.getClassPathElements());
38     }
39
40     public void onUninstall() throws JBIException {
41         System.out.println("Bootstrap instance uninstalled.");
42         System.out.println("Installation = "+ctx.isInstall());
43         }
44 }
45
Popular Tags