Class PreCompressedResourceSupplier
java.lang.Object
io.undertow.server.handlers.resource.PreCompressedResourceSupplier
- All Implemented Interfaces:
ResourceSupplier
A resource supplier that allows pre-compressed resources to be served if the client accepts the request.
This is done by checking for the existence of a pre-compressed file, and if it exists and the client supports the encoding then the resource is returned for the pre compressed file
- Author:
- Stuart Douglas
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddEncoding
(String encoding, String extension) getResource
(HttpServerExchange exchange, String path) removeEncoding
(String encoding)
-
Constructor Details
-
PreCompressedResourceSupplier
-
-
Method Details
-
getResource
- Specified by:
getResource
in interfaceResourceSupplier
- Parameters:
exchange
- The current exchangepath
- The path to resolve- Returns:
- A resource to serve
- Throws:
IOException
- if an error ocured resolving the resource
-
addEncoding
-
removeEncoding
-