Class ServiceFinder.Builder<T>
java.lang.Object
org.glassfish.jersey.internal.ServiceFinder.Builder<T>
- Enclosing class:
ServiceFinder<T>
- Author:
- Mark Reinhold, Jakub Podlesak, Marek Potociar
-
Method Summary
Modifier and TypeMethodDescriptionfind()Create the service finder capable of locating the services with information specified by the builder.ignoreNotFound(boolean ignoreOnClassNotFound) Set the service finder to ignore the service if not found.loader(ClassLoader loader) Set the service finder to use the givenClassloader.runtimeType(RuntimeType runtimeType) Update the builder with a specified runtime type the searched services are constrained to it.serviceName(String serviceName) Set the service name the service finder use to locate the services.
-
Method Details
-
find
Create the service finder capable of locating the services with information specified by the builder.- Returns:
- the service finder instance.
-
serviceName
Set the service name the service finder use to locate the services.- Parameters:
serviceName- the service name correspond to a file in META-INF/services that contains a list of fully qualified class names.- Returns:
- the updated builder.
-
loader
Set the service finder to use the givenClassloader. By default, the context classloader is used.- Parameters:
loader- the given classloader for the service finder to use when searching for the service.- Returns:
- the updated builder.
-
ignoreNotFound
Set the service finder to ignore the service if not found. The default isfalse.- Parameters:
ignoreOnClassNotFound- whether to ignore the service not found or not.- Returns:
- the updated builder.
-
runtimeType
Update the builder with a specified runtime type the searched services are constrained to it.- Parameters:
runtimeType- the specified runtime type.- Returns:
- the updated builder.
-