Package | Description |
---|---|
org.jooby |
do more, more easily
|
org.jooby.handlers | |
org.jooby.test |
Modifier and Type | Class and Description |
---|---|
static class |
Response.Forwarding
A forwarding response.
|
Modifier and Type | Method and Description |
---|---|
Response |
Response.charset(Charset charset)
Set the
Charset to use and set the Content-Type header with the current
charset. |
Response |
Response.Forwarding.charset(Charset charset) |
Response |
Response.clearCookie(String name)
Discard a cookie from response.
|
Response |
Response.Forwarding.clearCookie(String name) |
Response |
Response.cookie(Cookie.Definition cookie)
Adds the specified cookie to the response.
|
Response |
Response.Forwarding.cookie(Cookie.Definition cookie) |
Response |
Response.cookie(Cookie cookie)
Adds the specified cookie to the response.
|
Response |
Response.Forwarding.cookie(Cookie cookie) |
default Response |
Response.cookie(String name,
String value)
Adds the specified cookie to the response.
|
Response |
Response.Forwarding.cookie(String name,
String value) |
Response |
Response.header(String name,
Iterable<Object> values)
Sets a response header with the given name and value.
|
Response |
Response.Forwarding.header(String name,
Iterable<Object> values) |
default Response |
Response.header(String name,
Object... values)
Sets a response header with the given name and value.
|
Response |
Response.Forwarding.header(String name,
Object... values) |
Response |
Response.header(String name,
Object value)
Sets a response header with the given name and value.
|
Response |
Response.Forwarding.header(String name,
Object value) |
Response |
Response.length(long length)
Set the length of the response and set the
Content-Length header. |
Response |
Response.Forwarding.length(long length) |
default Response |
Response.status(int status)
Set the HTTP response status.
|
Response |
Response.Forwarding.status(int status) |
Response |
Response.status(Status status)
Set the HTTP response status.
|
Response |
Response.Forwarding.status(Status status) |
Response |
Response.type(MediaType type)
Set the response media type and set the
Content-Type header. |
Response |
Response.Forwarding.type(MediaType type) |
default Response |
Response.type(String type)
Set the response media type and set the
Content-Type header. |
Response |
Response.Forwarding.type(String type) |
static Response |
Response.Forwarding.unwrap(Response rsp)
Unwrap a response in order to find out the target instance.
|
Modifier and Type | Method and Description |
---|---|
void |
RequestLogger.handle(Request req,
Response rsp) |
void |
Route.Handler.handle(Request req,
Response rsp)
Callback method for a HTTP request.
|
void |
Route.Before.handle(Request req,
Response rsp)
Allows for customized handler execution chains.
|
void |
Err.DefHandler.handle(Request req,
Response rsp,
Err ex) |
void |
Err.Handler.handle(Request req,
Response rsp,
Err ex)
Handle a route exception by properly logging the error and sending a err response to the
client.
|
void |
Route.Complete.handle(Request req,
Response rsp,
Optional<Throwable> cause)
Allows for log and cleanup a request.
|
Result |
Route.After.handle(Request req,
Response rsp,
Result result)
Allows for customized response before send it.
|
default void |
Sse.Handler.handle(Request req,
Response rsp,
Route.Chain chain) |
void |
Route.Filter.handle(Request req,
Response rsp,
Route.Chain chain)
The
handle method of the Filter is called by the server each time a
request/response pair is passed through the chain due to a client request for a resource at
the end of the chain. |
default void |
Route.Handler.handle(Request req,
Response rsp,
Route.Chain chain) |
default void |
Route.OneArgHandler.handle(Request req,
Response rsp,
Route.Chain chain) |
default void |
Route.ZeroArgHandler.handle(Request req,
Response rsp,
Route.Chain chain) |
default void |
Route.Before.handle(Request req,
Response rsp,
Route.Chain chain) |
default void |
Route.After.handle(Request req,
Response rsp,
Route.Chain chain) |
default void |
Route.Complete.handle(Request req,
Response rsp,
Route.Chain chain) |
default void |
Route.Chain.next(Request req,
Response rsp)
Invokes the next route in the chain.
|
void |
Route.Chain.next(String prefix,
Request req,
Response rsp)
Invokes the next route in the chain where
Route.name() starts with the given prefix. |
static Response |
Response.Forwarding.unwrap(Response rsp)
Unwrap a response in order to find out the target instance.
|
Constructor and Description |
---|
Forwarding(Response response)
Creates a new
Response.Forwarding response. |
Modifier and Type | Method and Description |
---|---|
void |
AssetHandler.handle(Request req,
Response rsp) |
void |
CsrfHandler.handle(Request req,
Response rsp,
Route.Chain chain) |
void |
CorsHandler.handle(Request req,
Response rsp,
Route.Chain chain) |
Constructor and Description |
---|
MockRouter(Jooby app,
Request req,
Response rsp) |
Copyright © 2019. All rights reserved.