1 22 package org.objectweb.petals.tools.ant.util; 23 24 import javax.management.MBeanServer ; 25 import javax.management.ObjectName ; 26 27 32 public class InstallationServiceMoc implements InstallationServiceMocMBean { 33 34 private MBeanServer beanServer; 35 36 public InstallationServiceMoc(MBeanServer beanServer) { 37 super(); 38 this.beanServer = beanServer; 39 } 40 41 public String installSharedLibrary(String slZipURL) { 42 return "foo003"; 43 } 44 45 public ObjectName loadInstaller(String componentName) { 46 return null; 47 } 48 49 public ObjectName loadNewInstaller(String installZipURL) { 50 ObjectName objectName = null; 51 try { 52 objectName = new ObjectName ("org.objectweb.petals:type=installer,name=foo001"); 53 beanServer.registerMBean(new InstallerMoc(beanServer), objectName); 54 } 55 catch (Exception e) { 56 e.printStackTrace(); 57 } 58 return objectName; 59 } 60 61 public boolean uninstallSharedLibrary(String slName) { 62 return true; 63 } 64 65 public boolean unloadInstaller(String aComponentName, boolean isToBeDeleted) { 66 return false; 67 } 68 69 } 70 | Popular Tags |