| Modifier and Type | Class and Description |
|---|---|
| public static class | |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private volatile Predicate | |
| private volatile Predicate | |
| private volatile Integer | cacheTime
If this is set this will be the maximum time (in seconds) the client will cache the resource. |
| private volatile boolean | canonicalizePaths
If the canonical version of paths should be passed into the resource manager. |
| private volatile ContentEncodedResourceManager | |
| private volatile boolean | directoryListingEnabled
If directory listing is enabled. |
| private static final Set | KNOWN_METHODS
Set of methods prescribed by HTTP 1.1. |
| private volatile MimeMappings | mimeMappings
The mime mappings that are used to determine the content type. |
| private final HttpHandler | next
Handler that is called if no resource is found |
| private volatile ResourceManager | |
| private volatile ResourceSupplier | |
| private final List |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | |
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public ResourceHandler | |
| private String | |
| private void | |
| public Predicate | |
| public Predicate | |
| public Integer | |
| public ContentEncodedResourceManager | |
| private Resource | getIndexFiles(HttpServerExchange exchange, ResourceSupplier resourceManager, final String base, List<String> possible)
|
| public MimeMappings | |
| public ResourceManager | |
| public ResourceSupplier | |
| public void | handleRequest(final HttpServerExchange
the HTTP request/response exchange exchange)Implements io. Handle the request. |
| public boolean | |
| public boolean | |
| private void | |
| public ResourceHandler | |
| public ResourceHandler | |
| public ResourceHandler | |
| public void | setCanonicalizePaths(boolean
If paths should be canonicalized canonicalizePaths)If this handler should use canonicalized paths. |
| public ResourceHandler | |
| public ResourceHandler | |
| public ResourceHandler | |
| public ResourceHandler | |
| public ResourceHandler | |
| public ResourceHandler |
| allowed | back to summary |
|---|---|
| private volatile Predicate allowed | |
| cachable | back to summary |
|---|---|
| private volatile Predicate cachable | |
| cacheTime | back to summary |
|---|---|
| private volatile Integer cacheTime If this is set this will be the maximum time (in seconds) the client will cache the resource. Note Do not set this for private resources, as it will cause a Cache-Control: public to be sent. Todo make this more flexible
This will only be used if the | |
| canonicalizePaths | back to summary |
|---|---|
| private volatile boolean canonicalizePaths If the canonical version of paths should be passed into the resource manager. | |
| contentEncodedResourceManager | back to summary |
|---|---|
| private volatile ContentEncodedResourceManager contentEncodedResourceManager | |
| directoryListingEnabled | back to summary |
|---|---|
| private volatile boolean directoryListingEnabled If directory listing is enabled. | |
| KNOWN_METHODS | back to summary |
|---|---|
| private static final Set<HttpString> KNOWN_METHODS Set of methods prescribed by HTTP 1.1. If request method is not one of those, handler will return NOT_IMPLEMENTED. | |
| mimeMappings | back to summary |
|---|---|
| private volatile MimeMappings mimeMappings The mime mappings that are used to determine the content type. | |
| next | back to summary |
|---|---|
| private final HttpHandler next Handler that is called if no resource is found | |
| resourceManager | back to summary |
|---|---|
| private volatile ResourceManager resourceManager | |
| resourceSupplier | back to summary |
|---|---|
| private volatile ResourceSupplier resourceSupplier | |
| welcomeFiles | back to summary |
|---|---|
| private final List<String> welcomeFiles | |
| ResourceHandler | back to summary |
|---|---|
| public ResourceHandler(ResourceManager resourceSupplier) | |
| ResourceHandler | back to summary |
|---|---|
| public ResourceHandler(ResourceManager resourceManager, HttpHandler next) | |
| ResourceHandler | back to summary |
|---|---|
| public ResourceHandler(ResourceSupplier resourceSupplier) | |
| ResourceHandler | back to summary |
|---|---|
| public ResourceHandler(ResourceSupplier resourceManager, HttpHandler next) | |
| ResourceHandler | back to summary |
|---|---|
| public ResourceHandler()
Deprecated
You should use
| |
| addWelcomeFiles | back to summary |
|---|---|
| public ResourceHandler addWelcomeFiles(String... files) | |
| canonicalize | back to summary |
|---|---|
| private String canonicalize(String s) | |
| clearCacheHeaders | back to summary |
|---|---|
| private void clearCacheHeaders(HttpServerExchange exchange) | |
| getAllowed | back to summary |
|---|---|
| public Predicate getAllowed() | |
| getCachable | back to summary |
|---|---|
| public Predicate getCachable() | |
| getCacheTime | back to summary |
|---|---|
| public Integer getCacheTime() | |
| getContentEncodedResourceManager | back to summary |
|---|---|
| public ContentEncodedResourceManager getContentEncodedResourceManager() | |
| getIndexFiles | back to summary |
|---|---|
| private Resource getIndexFiles(HttpServerExchange exchange, ResourceSupplier resourceManager, final String base, List<String> possible) throws IOException | |
| getMimeMappings | back to summary |
|---|---|
| public MimeMappings getMimeMappings() | |
| getResourceManager | back to summary |
|---|---|
| public ResourceManager getResourceManager() | |
| getResourceSupplier | back to summary |
|---|---|
| public ResourceSupplier getResourceSupplier() | |
| handleRequest | back to summary |
|---|---|
| public void handleRequest(final HttpServerExchange exchange) throws Exception Implements io. Doc from io. Handle the request.
| |
| isCanonicalizePaths | back to summary |
|---|---|
| public boolean isCanonicalizePaths() | |
| isDirectoryListingEnabled | back to summary |
|---|---|
| public boolean isDirectoryListingEnabled() | |
| serveResource | back to summary |
|---|---|
| private void serveResource(final HttpServerExchange exchange, final boolean sendContent) throws Exception | |
| setAllowed | back to summary |
|---|---|
| public ResourceHandler setAllowed(final Predicate allowed) | |
| setCachable | back to summary |
|---|---|
| public ResourceHandler setCachable(final Predicate cachable) | |
| setCacheTime | back to summary |
|---|---|
| public ResourceHandler setCacheTime(final Integer cacheTime) | |
| setCanonicalizePaths | back to summary |
|---|---|
| public void setCanonicalizePaths(boolean canonicalizePaths) If this handler should use canonicalized paths. Warning If this is not true and
| |
| setContentEncodedResourceManager | back to summary |
|---|---|
| public ResourceHandler setContentEncodedResourceManager(ContentEncodedResourceManager contentEncodedResourceManager) | |
| setDirectoryListingEnabled | back to summary |
|---|---|
| public ResourceHandler setDirectoryListingEnabled(final boolean directoryListingEnabled) | |
| setMimeMappings | back to summary |
|---|---|
| public ResourceHandler setMimeMappings(final MimeMappings mimeMappings) | |
| setResourceManager | back to summary |
|---|---|
| public ResourceHandler setResourceManager(final ResourceManager resourceManager) | |
| setResourceSupplier | back to summary |
|---|---|
| public ResourceHandler setResourceSupplier(final ResourceSupplier resourceSupplier) | |
| setWelcomeFiles | back to summary |
|---|---|
| public ResourceHandler setWelcomeFiles(String... files) | |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public HandlerWrapper | build(Map<String, Object>
The handler config config)Implements io. Creates the handler |
| public String | |
| public String | name()
Implements io. The string representation of the handler name. |
| public Map | parameters()
Implements io. Returns a map of parameters and their types. |
| public Set |
| Builder | back to summary |
|---|---|
| public Builder() | |
| build | back to summary |
|---|---|
| public HandlerWrapper build(Map<String, Object> config) Implements io. Doc from io. Creates the handler
| |
| defaultParameter | back to summary |
|---|---|
| public String defaultParameter() Implements io.
| |
| name | back to summary |
|---|---|
| public String name() Implements io. Doc from io. The string representation of the handler name. | |
| parameters | back to summary |
|---|---|
| public Map Implements io. Doc from io. Returns a map of parameters and their types.
| |
| requiredParameters | back to summary |
|---|---|
| public Set Implements io.
| |
| Modifier and Type | Field and Description |
|---|---|
| private final boolean | |
| private final String |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public HttpHandler |
| allowDirectoryListing | back to summary |
|---|---|
| private final boolean allowDirectoryListing | |
| location | back to summary |
|---|---|
| private final String location | |
| Wrapper | back to summary |
|---|---|
| private Wrapper(String location, boolean allowDirectoryListing) | |
| wrap | back to summary |
|---|---|
| public HttpHandler wrap(HttpHandler handler) Implements io.
| |