1 20 21 package org.jdesktop.jdic.tray.internal; 22 23 24 import org.jdesktop.jdic.tray.internal.impl.ServiceManagerStub; 25 import org.jdesktop.jdic.init.JdicInitException; 26 import org.jdesktop.jdic.init.JdicManager; 27 28 29 37 public class ServiceManager { 38 39 42 public static final String SYSTEM_TRAY_SERVICE = "SystemTrayService"; 43 44 47 public static final String TRAY_ICON_SERVICE = "TrayIconService"; 48 49 52 public static final String TRAY_APPLET_SERVICE = "TrayAppletService"; 53 54 57 private ServiceManager() {} 58 59 static { 63 try { 64 JdicManager jm = JdicManager.getManager(); 65 jm.initShareNative(); 66 } catch (JdicInitException e){ 67 e.printStackTrace(); 68 } 69 } 70 71 79 public static Object getService(String serviceName) 80 throws NullPointerException { 81 if (serviceName == null) { 82 throw new NullPointerException ("Service name is null."); 83 } 84 85 return ServiceManagerStub.getService(serviceName); 86 } 87 } 88 | Popular Tags |