1 7 8 package javax.jnlp; 9 10 22 public final class ServiceManager { 23 static private ServiceManagerStub _stub = null; 24 25 26 private ServiceManager() { } 27 28 40 public static Object lookup(String name) throws UnavailableServiceException { 41 if (_stub != null) { 42 return _stub.lookup(name); 43 } else { 44 throw new UnavailableServiceException("uninitialized"); 45 } 46 } 47 48 51 public static String[] getServiceNames() { 52 if (_stub != null) { 53 return _stub.getServiceNames(); 54 } else { 55 return null; 56 } 57 } 58 59 69 public static synchronized void setServiceManagerStub(ServiceManagerStub stub) { 70 if (_stub == null) { 71 _stub = stub; 72 } 73 } 74 } 75 76 | Popular Tags |