public abstract static class ServiceFinder.ServiceIteratorProvider extends Object
The default implementation looks up provider classes from META-INF/services
files, see ServiceFinder.DefaultServiceIteratorProvider
.
This implementation may be overridden by invoking
ServiceFinder.setIteratorProvider(org.glassfish.jersey.internal.ServiceFinder.ServiceIteratorProvider)
.
Constructor and Description |
---|
ServiceIteratorProvider() |
Modifier and Type | Method and Description |
---|---|
abstract <T> Iterator<Class<T>> |
createClassIterator(Class<T> service,
String serviceName,
ClassLoader loader,
boolean ignoreOnClassNotFound)
Iterate over provider classes of a service.
|
abstract <T> Iterator<T> |
createIterator(Class<T> service,
String serviceName,
ClassLoader loader,
boolean ignoreOnClassNotFound)
Iterate over provider instances of a service.
|
public abstract <T> Iterator<T> createIterator(Class<T> service, String serviceName, ClassLoader loader, boolean ignoreOnClassNotFound)
T
- the type of the service.service
- the service class.serviceName
- the service name.loader
- the class loader to utilize when loading provider
classes.ignoreOnClassNotFound
- if true ignore an instance if the
corresponding provider class if cannot be found,
otherwise throw a ClassNotFoundException
.public abstract <T> Iterator<Class<T>> createClassIterator(Class<T> service, String serviceName, ClassLoader loader, boolean ignoreOnClassNotFound)
T
- the type of the service.service
- the service class.serviceName
- the service name.loader
- the class loader to utilize when loading provider
classes.ignoreOnClassNotFound
- if true ignore the provider class if
cannot be found,
otherwise throw a ClassNotFoundException
.Copyright © 2007-2024, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.