Interface StaticContentService
- All Superinterfaces:
- HttpService,- ServerLifecycle
@Deprecated(forRemoval=true,
            since="4.1.5")
public interface StaticContentService
extends HttpService
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
 HttpRouting. 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 SummaryNested ClassesModifier and TypeInterfaceDescriptionstatic classDeprecated, for removal: This API element is subject to removal in a future version.replaced withFileSystemHandlerConfigandClasspathHandlerConfigstatic classDeprecated, for removal: This API element is subject to removal in a future version.Builder for class path based static content.static classDeprecated, for removal: This API element is subject to removal in a future version.Builder for file based static content supports, such as file based and classpath based.static classDeprecated, for removal: This API element is subject to removal in a future version.Builder for file system based static content.
- 
Method SummaryModifier and TypeMethodDescriptionDeprecated, for removal: This API element is subject to removal in a future version.useClasspathHandlerConfig.builder()insteadbuilder(String resourceRoot, ClassLoader classLoader) Deprecated, for removal: This API element is subject to removal in a future version.useClasspathHandlerConfig.builder()insteadDeprecated, for removal: This API element is subject to removal in a future version.useFileSystemHandlerConfig.builder()insteadstatic StaticContentServiceDeprecated, for removal: This API element is subject to removal in a future version.static StaticContentServicecreate(String resourceRoot, ClassLoader classLoader) Deprecated, for removal: This API element is subject to removal in a future version.static StaticContentServiceDeprecated, for removal: This API element is subject to removal in a future version.Methods inherited from interface io.helidon.webserver.http.HttpServiceroutingMethods inherited from interface io.helidon.webserver.ServerLifecycleafterStart, afterStop, beforeStart
- 
Method Details- 
builder@Deprecated(forRemoval=true, since="4.1.5") static StaticContentService.ClassPathBuilder builder(String resourceRoot) Deprecated, for removal: This API element is subject to removal in a future version.useClasspathHandlerConfig.builder()insteadCreates 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- if- resourceRootattribute is- null
 
- 
builder@Deprecated(forRemoval=true, since="4.1.5") static StaticContentService.ClassPathBuilder builder(String resourceRoot, ClassLoader classLoader) Deprecated, for removal: This API element is subject to removal in a future version.useClasspathHandlerConfig.builder()insteadCreates 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- if- resourceRootattribute is- null
 
- 
builder@Deprecated(forRemoval=true, since="4.1.5") static StaticContentService.FileSystemBuilder builder(Path root) Deprecated, for removal: This API element is subject to removal in a future version.useFileSystemHandlerConfig.builder()insteadCreates 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- if- rootattribute is- null
 
- 
createDeprecated, 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- if- resourceRootattribute is- null
 
- 
create@Deprecated(forRemoval=true, since="4.1.5") static StaticContentService create(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.- Parameters:
- resourceRoot- a root resource path.
- classLoader- a class-loader for the static content
- Returns:
- created instance
- Throws:
- NullPointerException- if- resourceRootattribute is- null
 
- 
createDeprecated, 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- if- rootattribute is- null
 
 
- 
StaticContentFeatureinstead, or if specific services are desired, kindly useStaticContentFeature.createService(ClasspathHandlerConfig)and/orStaticContentFeature.createService(FileSystemHandlerConfig)