Class ResourceHandler
- java.lang.Object
-
- org.forgerock.openig.handler.resources.ResourceHandler
-
- All Implemented Interfaces:
org.forgerock.http.Handler
public class ResourceHandler extends Object implements org.forgerock.http.Handler
AResourceHandleris a handler that serves static content (content of a directory, or a zip).It's using the remaining URL information provided by the
UriRouterContextto determine the resource path to look for.
-
-
Constructor Summary
Constructors Constructor Description ResourceHandler(org.forgerock.util.Factory<org.forgerock.http.io.Buffer> storage, List<ResourceSet> sets, List<String> welcomePages)Creates a newResourceHandlerwith the givensetsofResourceSetand the list of welcome pages mappings.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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)
-
-
-
Constructor Detail
-
ResourceHandler
public ResourceHandler(org.forgerock.util.Factory<org.forgerock.http.io.Buffer> storage, List<ResourceSet> sets, List<String> welcomePages)Creates a newResourceHandlerwith the givensetsofResourceSetand the list of welcome pages mappings.- Parameters:
storage- the temporary storage to use to stream the resourcesets- provide access toResource.welcomePages- the list of resources name to be searched if there is no remaining path to use in the request.
-
-
Method Detail
-
handle
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)- Specified by:
handlein interfaceorg.forgerock.http.Handler
-
-