/** * Adds a {@code Service} to this {@code Provider}. If a service with the * same name was registered via this method, it is replace. * * @param s * the {@code Service} to register */ protected synchronized void putService(Provider.Service s) { if (s == null) { throw new NullPointerException("s == null"); } if ("Provider".equals(s.getType())) { // Provider service type cannot be added return; } servicesChanged(); if (serviceTable == null) { serviceTable = new LinkedHashMap<String, Service>(128); } serviceTable.put(key(s.type, s.algorithm), s); if (s.aliases != null) { if (aliasTable == null) { aliasTable = new LinkedHashMap<String, Service>(256); } for (String alias : s.getAliases()) { aliasTable.put(key(s.type, alias), s); } } serviceInfoToProperties(s); }
/** * Adds a {@code Service} to this {@code Provider}. If a service with the * same name was registered via this method, it is replace. * * @param s * the {@code Service} to register */ protected synchronized void putService(Provider.Service s) { if (s == null) { throw new NullPointerException("s == null"); } if ("Provider".equals(s.getType())) { // Provider service type cannot be added return; } servicesChanged(); if (serviceTable == null) { serviceTable = new LinkedHashMap<String, Service>(128); } serviceTable.put(key(s.type, s.algorithm), s); if (s.aliases != null) { if (aliasTable == null) { aliasTable = new LinkedHashMap<String, Service>(256); } for (String alias : s.getAliases()) { aliasTable.put(key(s.type, alias), s); } } serviceInfoToProperties(s); }
/** * Adds a {@code Service} to this {@code Provider}. If a service with the * same name was registered via this method, it is replace. * * @param s * the {@code Service} to register */ protected synchronized void putService(Provider.Service s) { if (s == null) { throw new NullPointerException("s == null"); } if ("Provider".equals(s.getType())) { // Provider service type cannot be added return; } servicesChanged(); if (serviceTable == null) { serviceTable = new LinkedHashMap<String, Service>(128); } serviceTable.put(key(s.type, s.algorithm), s); if (s.aliases != null) { if (aliasTable == null) { aliasTable = new LinkedHashMap<String, Service>(256); } for (String alias : s.getAliases()) { aliasTable.put(key(s.type, alias), s); } } serviceInfoToProperties(s); }
/** * Adds a {@code Service} to this {@code Provider}. If a service with the * same name was registered via this method, it is replace. * * @param s * the {@code Service} to register */ protected synchronized void putService(Provider.Service s) { if (s == null) { throw new NullPointerException("s == null"); } if ("Provider".equals(s.getType())) { // Provider service type cannot be added return; } servicesChanged(); if (serviceTable == null) { serviceTable = new LinkedHashMap<String, Service>(128); } serviceTable.put(key(s.type, s.algorithm), s); if (s.aliases != null) { if (aliasTable == null) { aliasTable = new LinkedHashMap<String, Service>(256); } for (String alias : s.getAliases()) { aliasTable.put(key(s.type, alias), s); } } serviceInfoToProperties(s); }
/** * Adds a {@code Service} to this {@code Provider}. If a service with the * same name was registered via this method, it is replace. * * @param s * the {@code Service} to register */ protected synchronized void putService(Provider.Service s) { if (s == null) { throw new NullPointerException("s == null"); } if ("Provider".equals(s.getType())) { // Provider service type cannot be added return; } servicesChanged(); if (serviceTable == null) { serviceTable = new LinkedHashMap<String, Service>(128); } serviceTable.put(key(s.type, s.algorithm), s); if (s.aliases != null) { if (aliasTable == null) { aliasTable = new LinkedHashMap<String, Service>(256); } for (String alias : s.getAliases()) { aliasTable.put(key(s.type, alias), s); } } serviceInfoToProperties(s); }
/** * Adds a {@code Service} to this {@code Provider}. If a service with the * same name was registered via this method, it is replace. * * @param s * the {@code Service} to register */ protected synchronized void putService(Provider.Service s) { if (s == null) { throw new NullPointerException("s == null"); } if ("Provider".equals(s.getType())) { // Provider service type cannot be added return; } servicesChanged(); if (serviceTable == null) { serviceTable = new LinkedHashMap<String, Service>(128); } serviceTable.put(key(s.type, s.algorithm), s); if (s.aliases != null) { if (aliasTable == null) { aliasTable = new LinkedHashMap<String, Service>(256); } for (String alias : s.getAliases()) { aliasTable.put(key(s.type, alias), s); } } serviceInfoToProperties(s); }
/** * Adds a {@code Service} to this {@code Provider}. If a service with the * same name was registered via this method, it is replace. * * @param s * the {@code Service} to register */ protected synchronized void putService(Provider.Service s) { if (s == null) { throw new NullPointerException("s == null"); } if ("Provider".equals(s.getType())) { // Provider service type cannot be added return; } servicesChanged(); if (serviceTable == null) { serviceTable = new LinkedHashMap<String, Service>(128); } serviceTable.put(key(s.type, s.algorithm), s); if (s.aliases != null) { if (aliasTable == null) { aliasTable = new LinkedHashMap<String, Service>(256); } for (String alias : s.getAliases()) { aliasTable.put(key(s.type, alias), s); } } serviceInfoToProperties(s); }