public class ResourceHandler extends Object implements org.forgerock.http.Handler
ResourceHandler
is a handler that serves static content (content of a directory, or a zip).
It's using the remaining URL information provided by the UriRouterContext
to determine
the resource path to look for.
Constructor and Description |
---|
ResourceHandler(org.forgerock.util.Factory<org.forgerock.http.io.Buffer> storage,
List<ResourceSet> sets,
List<String> welcomePages)
Creates a new
ResourceHandler with the given sets of ResourceSet and the
list of welcome pages mappings. |
Modifier and Type | Method and Description |
---|---|
org.forgerock.util.promise.Promise<org.forgerock.http.protocol.Response,org.forgerock.util.promise.NeverThrowsException> |
handle(org.forgerock.services.context.Context context,
org.forgerock.http.protocol.Request request) |
public ResourceHandler(org.forgerock.util.Factory<org.forgerock.http.io.Buffer> storage, List<ResourceSet> sets, List<String> welcomePages)
ResourceHandler
with the given sets
of ResourceSet
and the
list of welcome pages mappings.storage
- the temporary storage to use to stream the resourcesets
- provide access to Resource
.welcomePages
- the list of resources name to be searched if there is
no remaining path to use in the request.public org.forgerock.util.promise.Promise<org.forgerock.http.protocol.Response,org.forgerock.util.promise.NeverThrowsException> handle(org.forgerock.services.context.Context context, org.forgerock.http.protocol.Request request)
handle
in interface org.forgerock.http.Handler
Copyright © 2025 Open Identity Platform Community. All rights reserved.