1 20 21 package org.jdesktop.jdic.desktop.internal; 22 23 import org.jdesktop.jdic.desktop.internal.impl.ServiceManagerStub; 24 import org.jdesktop.jdic.init.JdicInitException; 25 import org.jdesktop.jdic.init.JdicManager; 26 27 28 39 public class ServiceManager { 40 41 44 public static final String LAUNCH_SERVICE = "LaunchService"; 45 46 49 public static final String BROWSER_SERVICE = "BrowserService"; 50 51 54 public static final String MAILER_SERVICE = "MailerService"; 55 56 59 private ServiceManager() {} 60 61 static { 65 try { 66 JdicManager jm = JdicManager.getManager(); 67 jm.initShareNative(); 68 } catch (JdicInitException e){ 69 e.printStackTrace(); 70 } 71 } 72 73 84 public static Object getService(String serviceName) 85 throws NullPointerException { 86 if (serviceName == null) { 87 throw new NullPointerException ("Service name is null."); 88 } 89 90 return ServiceManagerStub.getService(serviceName); 91 } 92 } 93 | Popular Tags |