Package org.forgerock.http.spi
Interface Loader
-
public interface Loader
An SPI interface for implementing alternative service loading strategies. By default the HTTP framework will use a strategy based onServiceLoader
, but applications may choose to override with their own strategy if needed, for example when running in OSGI environments.
-
-
Field Summary
Fields Modifier and Type Field Description static Loader
SERVICE_LOADER
The defaultLoader
implementation used throughout the HTTP framework.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <S> S
load(Class<S> service, Options options)
Loads a service of the specified type.
-
-
-
Field Detail
-
SERVICE_LOADER
static final Loader SERVICE_LOADER
The defaultLoader
implementation used throughout the HTTP framework. This implementation usesServiceLoader
for loading services.
-
-
Method Detail
-
load
<S> S load(Class<S> service, Options options)
Loads a service of the specified type. Implementations may customize their behavior based on the provided options, e.g. by using a user provided class loader.- Type Parameters:
S
- The type of service to load.- Parameters:
service
- The type of service to load.options
- The user provided options.- Returns:
- The loaded service, or
null
if no corresponding service was found.
-
-