java.lang.Object
io.helidon.webserver.StaticContentSupport
- All Implemented Interfaces:
Service
@Deprecated(since="2.3.0",
forRemoval=true)
public class StaticContentSupport
extends Object
implements Service
Deprecated, for removal: This API element is subject to removal in a future version.
Serves 'static content' (files) from filesystem or using a classloader to the
WebServer
Routing. It is possible to register it on the routing.
// Serve content of attached '/static/pictures' on '/pics'
Routing.builder()
.register("/pics", StaticContentSupport.create("/static/pictures"))
.build()
Content is served ONLY on HTTP GET method.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classDeprecated, for removal: This API element is subject to removal in a future version.Fluent builder of the StaticContent detailed parameters. -
Method Summary
Modifier and TypeMethodDescriptionstatic StaticContentSupport.BuilderDeprecated, for removal: This API element is subject to removal in a future version.Creates new builder with defined static content root as a class-loader resource.static StaticContentSupport.Builderbuilder(String resourceRoot, ClassLoader classLoader) Deprecated, for removal: This API element is subject to removal in a future version.Creates new builder with defined static content root as a class-loader resource.static StaticContentSupport.BuilderDeprecated, for removal: This API element is subject to removal in a future version.Creates new builder with defined static content root as a path to the file system.static StaticContentSupportDeprecated, for removal: This API element is subject to removal in a future version.Creates new instance with defined static content root as a class-loader resource.static StaticContentSupportcreate(String resourceRoot, ClassLoader classLoader) Deprecated, for removal: This API element is subject to removal in a future version.Creates new instance with defined static content root as a class-loader resource.static StaticContentSupportDeprecated, for removal: This API element is subject to removal in a future version.Creates new instance with defined static content root as a path to the file system.voidupdate(Routing.Rules routing) Deprecated, for removal: This API element is subject to removal in a future version.UpdatesRouting.Ruleswithhandlersrepresenting this service.
-
Method Details
-
update
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:ServiceUpdatesRouting.Ruleswithhandlersrepresenting this service. -
builder
Deprecated, for removal: This API element is subject to removal in a future version.Creates new builder with defined static content root as a class-loader resource. Builder provides ability to define more advanced configuration.Current context classloader is used to load static content.
- Parameters:
resourceRoot- a root resource path.- Returns:
- a builder
- Throws:
NullPointerException- ifresourceRootattribute isnull
-
builder
Deprecated, for removal: This API element is subject to removal in a future version.Creates new builder with defined static content root as a class-loader resource. Builder provides ability to define more advanced configuration.- Parameters:
resourceRoot- a root resource path.classLoader- a class-loader for the static content- Returns:
- a builder
- Throws:
NullPointerException- ifresourceRootattribute isnull
-
builder
Deprecated, for removal: This API element is subject to removal in a future version.Creates new builder with defined static content root as a path to the file system. Builder provides ability to define more advanced configuration.- Parameters:
root- a root path.- Returns:
- a builder
- Throws:
NullPointerException- ifrootattribute isnull
-
create
Deprecated, for removal: This API element is subject to removal in a future version.Creates new instance with defined static content root as a class-loader resource.Current context classloader is used to load static content.
- Parameters:
resourceRoot- a root resource path.- Returns:
- created instance
- Throws:
NullPointerException- ifresourceRootattribute isnull
-
create
Deprecated, for removal: This API element is subject to removal in a future version.Creates new instance with defined static content root as a class-loader resource.- Parameters:
resourceRoot- a root resource path.classLoader- a class-loader for the static content- Returns:
- created instance
- Throws:
NullPointerException- ifresourceRootattribute isnull
-
create
Deprecated, for removal: This API element is subject to removal in a future version.Creates new instance with defined static content root as a path to the file system.- Parameters:
root- a root path.- Returns:
- created instance
- Throws:
NullPointerException- ifrootattribute isnull
-
helidon-webserver-static-content