38 |
|
|
39 |
package javax.imageio.spi; |
package javax.imageio.spi; |
40 |
|
|
|
import java.util.*; |
|
41 |
import gnu.classpath.ServiceFactory; |
import gnu.classpath.ServiceFactory; |
42 |
|
|
43 |
|
import java.util.ArrayList; |
44 |
|
import java.util.Collection; |
45 |
|
import java.util.Collections; |
46 |
|
import java.util.Comparator; |
47 |
|
import java.util.HashSet; |
48 |
|
import java.util.IdentityHashMap; |
49 |
|
import java.util.Iterator; |
50 |
|
import java.util.LinkedList; |
51 |
|
import java.util.Map; |
52 |
|
import java.util.NoSuchElementException; |
53 |
|
import java.util.Set; |
54 |
|
|
55 |
/** |
/** |
56 |
* A registry for service providers. |
* A registry for service providers. |
110 |
/** |
/** |
111 |
* Constructs a <code>ServiceRegistry</code> for the specified |
* Constructs a <code>ServiceRegistry</code> for the specified |
112 |
* service categories. |
* service categories. |
113 |
|
* |
114 |
|
* @param categories the categories to support |
115 |
* |
* |
116 |
* @throws IllegalArgumentException if <code>categories</code> is |
* @throws IllegalArgumentException if <code>categories</code> is |
117 |
* <code>null</code>, or if its {@link Iterator#next()} method |
* <code>null</code>, or if its {@link Iterator#next()} method |
153 |
* might make sense to install only the frequently needed service |
* might make sense to install only the frequently needed service |
154 |
* providers on the local machine. More exotic providers can be put |
* providers on the local machine. More exotic providers can be put |
155 |
* onto a server; the server will only be contacted when no suitable |
* onto a server; the server will only be contacted when no suitable |
156 |
* service could be found locally. |
* service could be found locally.</p> |
157 |
* |
* |
158 |
* <p><b>Security considerations:</b> Any loaded service providers |
* <p><b>Security considerations:</b> Any loaded service providers |
159 |
* are loaded through the specified ClassLoader, or the system |
* are loaded through the specified ClassLoader, or the system |
162 |
* the current {@link java.security.AccessControlContext} gets |
* the current {@link java.security.AccessControlContext} gets |
163 |
* recorded. This captured security context will determine the |
* recorded. This captured security context will determine the |
164 |
* permissions when services get loaded via the <code>next()</code> |
* permissions when services get loaded via the <code>next()</code> |
165 |
* method of the returned <code>Iterator</code>. |
* method of the returned <code>Iterator</code>.</p> |
166 |
* |
* |
167 |
* @param spi the service provider interface which must be |
* @param spi the service provider interface which must be |
168 |
* implemented by any loaded service providers. |
* implemented by any loaded service providers. |
486 |
* invoked in order to inform the provider about the removal from |
* invoked in order to inform the provider about the removal from |
487 |
* this registry. If <code>provider</code> implements several |
* this registry. If <code>provider</code> implements several |
488 |
* service categories, <code>onDeregistration</code> gets called |
* service categories, <code>onDeregistration</code> gets called |
489 |
* multiple times. |
* multiple times.</p> |
490 |
* |
* |
491 |
* @param provider the service provider to be de-registered. |
* @param provider the service provider to be de-registered. |
492 |
* |
* |