Converts a boolean expression to a route matcher.
Converts a boolean expression to a route matcher.
a block that evaluates to a boolean
a route matcher based on block
. The route matcher should
return Some
if the block is true and None
if the block is false.
BooleanBlockRouteMatcher
Default charset.
Default charset.
The configuration, typically a ServletConfig or FilterConfig.
The configuration, typically a ServletConfig or FilterConfig.
Gets the content type of the current response.
Gets the content type of the current response.
A partial function to infer the content type from the action result.
A partial function to infer the content type from the action result.
$ - "text/plain" for String $ - "application/octet-stream" for a byte array $ - "text/html" for any other result
Sets the content type of the current response.
Sets the content type of the current response.
Current error handler.
Current error handler.
The default character encoding for requests and responses.
The default character encoding for requests and responses.
Detects error filter leak issue as an error.
Detects error filter leak issue as an error.
Called if no route matches the current request for any method.
Called if no route matches the current request for any method. The default implementation varies between servlet and filter.
Executes routes in the context of the current request and response.
Executes routes in the context of the current request and response.
$ 1. Executes each before filter with runFilters
.
$ 2. Executes the routes in the route registry with runRoutes
for the request's method.
doMethodNotAllowed
hook is run with each matching method.
c. If no route matches any method, then the doNotFound
hook is run,
and its return value becomes the action result.$ 3. If an exception is thrown during the before filters or the route actions,
then it is passed to the errorHandler
function, and its result becomes the action result.
$ 4. Executes the after filters with runFilters
.
$ 5. The action result is passed to renderResponse
.
ExecutionContext implicit value for this web controller.
ExecutionContext implicit value for this web controller.
Returns query string multi parameters as a Map value.
Returns query string multi parameters as a Map value.
Returns query string parameters as a Map value.
Returns query string parameters as a Map value.
Explicitly sets the request-scoped format.
Explicitly sets the request-scoped format. This takes precedence over whatever was inferred from the request.
Builds a full URL from the given relative path.
Builds a full URL from the given relative path. Takes into account the port configuration, https, ...
a relative path
the full URL
Immediately halts processing of a request.
Immediately halts processing of a request. Can be called from either a before filter or a route.
the status to set on the response, or null to leave the status unchanged.
a result to render through the render pipeline as the body
headers to add to the response
the HTTP status reason to set, or null to leave unchanged.
Handles a request and renders a response.
Handles a request and renders a response.
$ 1. If the request lacks a character encoding, defaultCharacterEncoding
is set to the request.
$ 2. Sets the response's character encoding to defaultCharacterEncoding
.
$ 3. Binds the current request
, response
, and multiParams
, and calls executeRoutes()
.
Gets an init parameter from the config.
Gets an init parameter from the config.
the name of the key
an option containing the value of the parameter if defined, or
None
if the parameter is not set.
Initializes the kernel.
Initializes the kernel. Used to provide context that is unavailable
when the instance is constructed, for example the servlet lifecycle.
Should set the config
variable to the parameter.
the configuration.
Invokes a route or filter.
Invokes a route or filter. The multiParams gathered from the route matchers are merged into the existing route params, and then the action is run.
the matched route to execute
the result of the matched route's action wrapped in Some
,
or None
if the action calls pass
.
true if async supported
true if async supported
Predicates current env is "development" or "dev".
Predicates current env is "development" or "dev".
true/false
Predicates current env is "production" or "prod".
Predicates current env is "production" or "prod".
true/false
Predicates current env is "staging" or "qa".
Predicates current env is "staging" or "qa".
true/false
Predicates current env is "test".
Predicates current env is "test".
true/false
Max duration to await async filters
Max duration to await async filters
The current multi params.
The current multi params.
Multi params are a result of merging the standard request params (query string or post params) with the route
parameters extracted from the route matchers of the current route.
The default value for an unknown param is the empty sequence.
Invalid outside handle
.
Immediately exits from the current route.
Immediately exits from the current route.
Path pattern is decoupled from requests.
Path pattern is decoupled from requests. This adapts the PathPattern to a RouteMatcher by supplying the request path.
Returns query string multi parameters as a Map value.
Returns query string multi parameters as a Map value.
Returns query string parameters as a Map value.
Returns query string parameters as a Map value.
Sends a redirect response and immediately halts the current action.
Sends a redirect response and immediately halts the current action.
Responds as "301 Moved Permanently"
Responds as "302 Found"
Responds as "303 See Other"
Converts a regular expression to a route matcher.
Converts a regular expression to a route matcher.
the regular expression
a route matcher based on regex
RegexRouteMatcher
Removes _all_ the actions of a given route for a given HTTP method.
Removes _all_ the actions of a given route for a given HTTP method. If addRoute is overridden then this should probably be overriden too.
Renders the action result to the response.
Renders the action result to the response.
$ - If the content type is still null, call the contentTypeInferrer. $ - Call the render pipeline on the result.
Renders the action result to the response body via the render pipeline.
Renders the action result to the response body via the render pipeline.
#renderPipeline
The effective path against which routes are matched.
The effective path against which routes are matched. The definition varies between servlets and filters.
Defines formats to be respond.
Defines formats to be respond. By default, HTML, JSON, XML are available.
formats
Returns rout base path.
Returns rout base path.
The routes registered in this kernel.
The routes registered in this kernel.
Implicit convert a (String) => Option[T]
function into a TypeConverter[T]
Implicit convert a (String) => Option[T]
function into a TypeConverter[T]
The servlet context in which this kernel runs.
The servlet context in which this kernel runs.
The current session.
The current session. Creates a session if none exists.
The current session.
The current session. If none exists, None is returned.
As default, the servlet tries to decode params with ISO_8859-1.
As default, the servlet tries to decode params with ISO_8859-1. It causes an EOFException if params are actually encoded with the other code (such as UTF-8)
A hook to shutdown the class.
A hook to shutdown the class. Bridges the gap between servlet's destroy and filter's destroy.
Skinny Micro Context
Skinny Micro Context
Env string value from "skinny.
Env string value from "skinny.env" or "org.scalatra.environment".
env string such as "production"
The default value is false to keep backward compatibility.
The default value is false to keep backward compatibility.
Gets the status code of the current response.
Gets the status code of the current response.
Sets the status code of the current response.
Sets the status code of the current response.
Pluggable way to convert a path expression to a route matcher.
Pluggable way to convert a path expression to a route matcher. The default implementation is compatible with Sinatra's route syntax.
a path expression
a route matcher based on path
Enables unstable access validation.
Enables unstable access validation.
Returns a context-relative, session-aware URL for a path and specified parameters.
Returns a context-relative, session-aware URL for a path and specified parameters.
Finally, the result is run through response.encodeURL
for a session
ID, if necessary.
the base path. If a path begins with '/', then the context path will be prepended to the result
params, to be appended in the form of a query string
the path plus the query string, if any. The path is run through
response.encodeURL
to add any necessary session tracking parameters.
Enables mostly stable Servlet HttpSession implementation instead.
Enables mostly stable Servlet HttpSession implementation instead.
Executes the block with the given request bound to the request
method.
Executes the block with the given request bound to the request
method.
Executes the block with the given response bound to the response
method.
Executes the block with the given response bound to the response
method.
Base trait for SkinnyMicroFilter implementations.