Class StaticFileServer
java.lang.Object
com.spec.web.expresso.middleware.MiddlewareMetaData
com.spec.web.expresso.middleware.standard.StaticFileServer
Hosts static folder that is externl to the packaged JAR.
-
Constructor Summary
ConstructorsConstructorDescriptionStaticFileServer(String staticFolderPath) Create an instance of class with a staticFolderPath where this the path to folder containing the static files. -
Method Summary
Modifier and TypeMethodDescriptioncom.spec.web.expresso.middleware.standard.StaticFileServerMiddlewareReturns the middleware registered on the following StaticFileServer.voidThe middleware needs to know on what path(URL path on web) it is registered.Methods inherited from class com.spec.web.expresso.middleware.MiddlewareMetaData
addPrefixPath, appendPath, calcPath, copy, getMethod, getPath, setMethod, toString
-
Constructor Details
-
StaticFileServer
Create an instance of class with a staticFolderPath where this the path to folder containing the static files.- Parameters:
staticFolderPath- Path to the folder containing static files
-
-
Method Details
-
setPath
The middleware needs to know on what path(URL path on web) it is registered. The following methods passes the registered URL path to the middleware which the middleware uses internally to compute the path to file..- Overrides:
setPathin classMiddlewareMetaData- Parameters:
pathString- The string containing the path.
-
getMiddleware
public com.spec.web.expresso.middleware.standard.StaticFileServerMiddleware getMiddleware()Returns the middleware registered on the following StaticFileServer.- Overrides:
getMiddlewarein classMiddlewareMetaData- Returns:
- Instance of middleware.
-