Package ej.hoka.http.requesthandler
Class ClasspathFilesHandler.ClasspathFilesHandlerBuilder
- java.lang.Object
-
- ej.hoka.http.requesthandler.ClasspathFilesHandler.ClasspathFilesHandlerBuilder
-
- Enclosing class:
- ClasspathFilesHandler
public static class ClasspathFilesHandler.ClasspathFilesHandlerBuilder extends java.lang.ObjectClasspathFilesHandlerbuilder.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ClasspathFilesHandlerbuild()Builds and returns theClasspathFilesHandlerinstance.ClasspathFilesHandler.ClasspathFilesHandlerBuilderexpireTimeSeconds(int expireTimeSeconds)Returns the instance ofClasspathFilesHandler.ClasspathFilesHandlerBuilderconfigured with the given duration as the expiration time for static resources.ClasspathFilesHandler.ClasspathFilesHandlerBuilderguessMimeType()activate content type guessing.ClasspathFilesHandler.ClasspathFilesHandlerBuilderrootDirectory(java.lang.String root)Returns the instance ofClasspathFilesHandler.ClasspathFilesHandlerBuilderconfigured with the given path as the root directory for resources to serve.ClasspathFilesHandler.ClasspathFilesHandlerBuilderwelcomeFile(java.lang.String welcome)Returns the instance ofClasspathFilesHandler.ClasspathFilesHandlerBuilderconfigured with the given file name as the index.
-
-
-
Method Detail
-
rootDirectory
public ClasspathFilesHandler.ClasspathFilesHandlerBuilder rootDirectory(java.lang.String root)
Returns the instance ofClasspathFilesHandler.ClasspathFilesHandlerBuilderconfigured with the given path as the root directory for resources to serve.- Parameters:
root- the path of the root directory for resources to serve.- Returns:
- the instance of
ClasspathFilesHandler.ClasspathFilesHandlerBuilderto continue configuring theClasspathFilesHandlerinstance.
-
welcomeFile
public ClasspathFilesHandler.ClasspathFilesHandlerBuilder welcomeFile(java.lang.String welcome)
Returns the instance ofClasspathFilesHandler.ClasspathFilesHandlerBuilderconfigured with the given file name as the index.- Parameters:
welcome- the directory index file name to serve in case a directory is requested.- Returns:
- the instance of
ClasspathFilesHandler.ClasspathFilesHandlerBuilderto continue configuring theClasspathFilesHandlerinstance.
-
expireTimeSeconds
public ClasspathFilesHandler.ClasspathFilesHandlerBuilder expireTimeSeconds(int expireTimeSeconds)
Returns the instance ofClasspathFilesHandler.ClasspathFilesHandlerBuilderconfigured with the given duration as the expiration time for static resources.- Parameters:
expireTimeSeconds- Sets the expire-time in seconds for static resources.- Returns:
- the instance of
ClasspathFilesHandler.ClasspathFilesHandlerBuilderto continue configuring theClasspathFilesHandlerinstance.
-
guessMimeType
public ClasspathFilesHandler.ClasspathFilesHandlerBuilder guessMimeType()
activate content type guessing. the content-type header will added with the guessed type. More types can be registered usingMime. Note this may impact the performance.- Returns:
- the instance of
ClasspathFilesHandler.ClasspathFilesHandlerBuilderto continue configuring theClasspathFilesHandlerinstance.
-
build
public ClasspathFilesHandler build()
Builds and returns theClasspathFilesHandlerinstance.- Returns:
- create
ClasspathFilesHandlerinstance.
-
-