public class ForwardingContext extends Object implements Context
ACCEPT, GMT, PORT, RFC1123, RFC1123_PATTERN, SECURE_PORT
Constructor and Description |
---|
ForwardingContext(Context context)
Creates a new forwarding context.
|
Modifier and Type | Method and Description |
---|---|
MediaType |
accept(List<MediaType> produceTypes)
Check if the accept type list matches the given produces list and return the most
specific media type from produces list.
|
boolean |
accept(MediaType contentType)
True if the given type matches the `Accept` header.
|
<T> T |
attribute(String key)
Get an attribute by his key.
|
Context |
attribute(String key,
Object value)
Set an application attribute.
|
Body |
body()
HTTP body which provides access to body content.
|
<T> T |
body(Class<T> type)
Convert the HTTP body to the given type.
|
<T> T |
body(Type type)
Convert the HTTP body to the given type.
|
<T> T |
convert(ValueNode value,
Class<T> type)
Converts a value (single or hash) into the given type.
|
Value |
cookie(String name)
Get a cookie matching the given name.
|
Map<String,String> |
cookieMap()
Request cookies.
|
<T> T |
decode(Type type,
MediaType contentType)
Convert the HTTP body to the given type.
|
MessageDecoder |
decoder(MediaType contentType)
Get a decoder for the given content type or get an
StatusCode.UNSUPPORTED_MEDIA_TYPE . |
Context |
detach(Route.Handler next)
Tells context that response will be generated form a different thread.
|
Context |
dispatch(Executor executor,
Runnable action)
Dispatch context to the given executor.
|
Context |
dispatch(Runnable action)
Dispatch context to a worker threads.
|
FileUpload |
file(String name)
A file upload that matches the given field name.
|
List<FileUpload> |
files()
All file uploads.
|
List<FileUpload> |
files(String name)
All file uploads that matches the given field name.
|
FlashMap |
flash()
Flash map.
|
Value |
flash(String name)
Get a flash attribute.
|
Formdata |
form()
Formdata as
ValueNode . |
<T> T |
form(Class<T> type)
Convert formdata to the given type.
|
ValueNode |
form(String name)
Form field that matches the given name.
|
Map<String,String> |
formMap()
Formdata as single-value map.
|
Map<String,List<String>> |
formMultimap()
Formdata as multi-value map.
|
Context |
forward(String path)
Forward executing to another route.
|
Map<String,Object> |
getAttributes()
Context attributes (a.k.a request attributes).
|
List<Certificate> |
getClientCertificates()
The certificates presented by the client for mutual TLS.
|
String |
getHost()
Return the host that this request was sent to, in general this will be the
value of the Host header, minus the port specifier.
|
String |
getHostAndPort()
Return the host and port that this request was sent to, in general this will be the
value of the Host.
|
String |
getMethod()
HTTP method in upper-case form.
|
int |
getPort()
Return the port that this request was sent to.
|
String |
getProtocol()
The name of the protocol the request.
|
String |
getRemoteAddress()
The IP address of the client or last proxy that sent the request.
|
long |
getRequestLength()
Request
Content-Length header or -1 when missing. |
String |
getRequestPath()
Request path without decoding (a.k.a raw Path) without query string.
|
MediaType |
getRequestType()
Request
Content-Type header or null when missing. |
MediaType |
getRequestType(MediaType defaults)
Request
Content-Type header or null when missing. |
String |
getRequestURL()
Recreates full/entire url of the current request using the
Host header. |
String |
getRequestURL(String path)
Recreates full/entire request url using the
Host header with a custom path/suffix. |
boolean |
getResetHeadersOnError()
True if response headers are cleared on application error.
|
StatusCode |
getResponseCode()
Get response status code.
|
String |
getResponseHeader(String name)
Get response header.
|
long |
getResponseLength()
Get response content length or
-1 when none was set. |
MediaType |
getResponseType()
Get response content type.
|
Route |
getRoute()
Matching route.
|
Router |
getRouter()
Get the HTTP router (usually this represent an instance of
Jooby . |
String |
getScheme()
HTTP scheme in lower case.
|
String |
getServerHost()
Server host.
|
int |
getServerPort()
Server port for current request.
|
<T> T |
getUser()
Current user or
null if none was set. |
ValueNode |
header()
Request headers as
ValueNode . |
Value |
header(String name)
Get a header that matches the given name.
|
Map<String,String> |
headerMap()
Header as single-value map.
|
Map<String,List<String>> |
headerMultimap()
Header as multi-value map.
|
boolean |
isInIoThread()
True when request runs in IO threads.
|
boolean |
isResponseStarted()
True if response already started.
|
boolean |
isSecure()
Returns a boolean indicating whether this request was made using a secure channel, such as
HTTPS.
|
boolean |
matches(String pattern)
Check if the request path matches the given pattern.
|
Multipart |
multipart()
Get multipart data.
|
<T> T |
multipart(Class<T> type)
Convert multipart data to the given type.
|
ValueNode |
multipart(String name)
Get a multipart field that matches the given name.
|
Map<String,String> |
multipartMap()
Multipart data as single-value map.
|
Map<String,List<String>> |
multipartMultimap()
Multipart data as multi-value map.
|
Context |
onComplete(Route.Complete task)
Add a complete listener.
|
ValueNode |
path()
Convert
Context.pathMap() to a ValueNode object. |
<T> T |
path(Class<T> type)
Convert the
Context.pathMap() to the given type. |
Value |
path(String name)
Path variable.
|
Map<String,String> |
pathMap()
Path map represent all the path keys with their values.
|
QueryString |
query()
Query string as
ValueNode object. |
<T> T |
query(Class<T> type)
Convert the queryString to the given type.
|
ValueNode |
query(String name)
Get a query parameter that matches the given name.
|
Map<String,String> |
queryMap()
Query string as simple map.
|
Map<String,List<String>> |
queryMultimap()
Query string as multi-value map.
|
String |
queryString()
Query string with the leading
? or empty string. |
Context |
removeResponseHeader(String name)
Remove a response header.
|
Context |
removeResponseHeaders()
Clear/reset all the headers, including cookies.
|
Context |
render(Object value)
Render a value and send the response to client.
|
<T> T |
require(Class<T> type)
Provides an instance of the given type.
|
<T> T |
require(Class<T> type,
String name)
Provides an instance of the given type where name matches it.
|
<T> T |
require(ServiceKey<T> key)
Provides an instance of the given type.
|
Sender |
responseSender()
HTTP response channel as chunker.
|
OutputStream |
responseStream()
HTTP response channel as output stream.
|
OutputStream |
responseStream(MediaType contentType)
HTTP response channel as output stream.
|
Context |
responseStream(MediaType contentType,
SneakyThrows.Consumer<OutputStream> consumer)
HTTP response channel as output stream.
|
Context |
responseStream(SneakyThrows.Consumer<OutputStream> consumer)
HTTP response channel as output stream.
|
PrintWriter |
responseWriter()
HTTP response channel as response writer.
|
PrintWriter |
responseWriter(MediaType contentType)
HTTP response channel as response writer.
|
PrintWriter |
responseWriter(MediaType contentType,
Charset charset)
HTTP response channel as response writer.
|
Context |
responseWriter(MediaType contentType,
Charset charset,
SneakyThrows.Consumer<PrintWriter> consumer)
HTTP response channel as response writer.
|
Context |
responseWriter(MediaType contentType,
SneakyThrows.Consumer<PrintWriter> consumer)
HTTP response channel as response writer.
|
Context |
responseWriter(SneakyThrows.Consumer<PrintWriter> consumer)
HTTP response channel as response writer.
|
Context |
send(byte[]... data)
Send response data.
|
Context |
send(byte[] data)
Send response data.
|
Context |
send(ByteBuffer data)
Send response data.
|
Context |
send(ByteBuffer[] data)
Send response data.
|
Context |
send(FileChannel file)
Send a file response.
|
Context |
send(FileDownload file)
Send a file download response.
|
Context |
send(InputStream input)
Send response data.
|
Context |
send(Path file)
Send a file response.
|
Context |
send(ReadableByteChannel channel)
Send response data.
|
Context |
send(StatusCode statusCode)
Send an empty response with the given status code.
|
Context |
send(String data)
Send response data.
|
Context |
send(String data,
Charset charset)
Send response data.
|
Context |
sendError(Throwable cause)
Send an error response.
|
Context |
sendError(Throwable cause,
StatusCode code)
Send an error response.
|
Context |
sendRedirect(StatusCode redirect,
String location)
Send a redirect response.
|
Context |
sendRedirect(String location)
Send a
302 response. |
Session |
session()
Find a session or creates a new session.
|
Value |
session(String name)
Find a session attribute using the given name.
|
Session |
sessionOrNull()
Find an existing session.
|
Context |
setDefaultResponseType(MediaType contentType)
Set the default response content type header.
|
Context |
setHost(String host)
Set the host (without the port value).
|
Context |
setMethod(String method)
Set HTTP method in upper-case form.
|
Context |
setPathMap(Map<String,String> pathMap)
Set path map.
|
Context |
setPort(int port)
Set port this request was sent to.
|
Context |
setRemoteAddress(String remoteAddress)
Set IP address of client or last proxy that sent the request.
|
Context |
setRequestPath(String path)
Set request path.
|
Context |
setResetHeadersOnError(boolean value)
Set whenever reset/clear headers on application error.
|
Context |
setResponseCode(int statusCode)
Set response status code.
|
Context |
setResponseCode(StatusCode statusCode)
Set response status code.
|
Context |
setResponseCookie(Cookie cookie)
Set/add a cookie to response.
|
Context |
setResponseHeader(String name,
Date value)
Set response header.
|
Context |
setResponseHeader(String name,
Instant value)
Set response header.
|
Context |
setResponseHeader(String name,
Object value)
Set response header.
|
Context |
setResponseHeader(String name,
String value)
Set response header.
|
Context |
setResponseLength(long length)
Set response content length header.
|
Context |
setResponseType(MediaType contentType)
Set response content type header.
|
Context |
setResponseType(MediaType contentType,
Charset charset)
Set response content type header.
|
Context |
setResponseType(String contentType)
Set response content type header.
|
Context |
setRoute(Route route)
Set matching route.
|
Context |
setScheme(String scheme)
Set HTTP scheme in lower case.
|
Context |
setUser(Object user)
Set current user.
|
String |
toString() |
Context |
upgrade(ServerSentEmitter.Handler handler)
Perform a server-sent event handshake and upgrade HTTP GET into a Server-Sent protocol.
|
Context |
upgrade(WebSocket.Initializer handler)
Perform a websocket handsahke and upgrade a HTTP GET into a websocket protocol.
|
@Nullable public <T> T getUser()
Context
null
if none was set.@Nonnull public Context setUser(@Nullable Object user)
Context
@Nonnull public Context forward(@Nonnull String path)
Context
public boolean matches(@Nonnull String pattern)
Context
public boolean isSecure()
Context
@Nonnull public Map<String,Object> getAttributes()
Context
getAttributes
in interface Context
@Nullable public <T> T attribute(@Nonnull String key)
Context
Context.getAttributes()
.
This method look first in current context and fallback to application attributes.@Nonnull public Context attribute(@Nonnull String key, Object value)
Context
@Nonnull public Router getRouter()
Context
Jooby
.@Nonnull public Value flash(@Nonnull String name)
Context
@Nonnull public Value session(@Nonnull String name)
Context
@Nonnull public Session session()
Context
@Nullable public Session sessionOrNull()
Context
sessionOrNull
in interface Context
null
.@Nonnull public Value cookie(@Nonnull String name)
Context
@Nonnull public Map<String,String> cookieMap()
Context
@Nonnull public String getMethod()
Context
@Nonnull public Context setMethod(@Nonnull String method)
Context
@Nonnull public Route getRoute()
Context
@Nonnull public Context setRoute(@Nonnull Route route)
Context
@Nonnull public String getRequestPath()
Context
getRequestPath
in interface Context
@Nonnull public Context setRequestPath(@Nonnull String path)
Context
setRequestPath
in interface Context
path
- Request path.@Nonnull public Value path(@Nonnull String name)
Context
@Nonnull public <T> T path(@Nonnull Class<T> type)
Context
Context.pathMap()
to the given type.@Nonnull public ValueNode path()
Context
Context.pathMap()
to a ValueNode
object.@Nonnull public Map<String,String> pathMap()
Context
{
get("/:id", ctx -> ctx.pathMap());
}
A call to:
GET /678Produces a path map like:
id: 678
@Nonnull public Context setPathMap(@Nonnull Map<String,String> pathMap)
Context
setPathMap
in interface Context
pathMap
- Path map.@Nonnull public QueryString query()
Context
ValueNode
object.@Nonnull public ValueNode query(@Nonnull String name)
Context
{
get("/search", ctx -> {
String q = ctx.query("q").value();
...
});
}
@Nonnull public String queryString()
Context
?
or empty string. This is the raw query string,
without decoding it.queryString
in interface Context
?
or empty string. This is the raw query
string, without decoding it.@Nonnull public <T> T query(@Nonnull Class<T> type)
Context
@Nonnull public Map<String,String> queryMap()
Context
{q: jooby, sort: name}
@Nonnull public Map<String,List<String>> queryMultimap()
Context
{q: [jooby], sort: [name, id]}
queryMultimap
in interface Context
@Nonnull public ValueNode header()
Context
ValueNode
.@Nonnull public Value header(@Nonnull String name)
Context
@Nonnull public Map<String,String> headerMap()
Context
@Nonnull public Map<String,List<String>> headerMultimap()
Context
headerMultimap
in interface Context
public boolean accept(@Nonnull MediaType contentType)
Context
true
if there is no accept header.@Nullable public MediaType accept(@Nonnull List<MediaType> produceTypes)
Context
@Nullable public MediaType getRequestType()
Context
Content-Type
header or null
when missing.getRequestType
in interface Context
Content-Type
header or null
when missing.@Nonnull public MediaType getRequestType(MediaType defaults)
Context
Content-Type
header or null
when missing.getRequestType
in interface Context
defaults
- Default content type to use when the header is missing.Content-Type
header or null
when missing.public long getRequestLength()
Context
Content-Length
header or -1
when missing.getRequestLength
in interface Context
Content-Length
header or -1
when missing.@Nonnull public String getRemoteAddress()
Context
Router.setTrustProxy(boolean)
option.getRemoteAddress
in interface Context
empty string
for interrupted requests.@Nonnull public Context setRemoteAddress(@Nonnull String remoteAddress)
Context
setRemoteAddress
in interface Context
remoteAddress
- Remote Address.@Nonnull public String getHost()
Context
Context.setHost(String)
method.
If you run behind a reverse proxy that has been configured to send the X-Forwarded-* header,
please consider to set Router.setTrustProxy(boolean)
option.@Nonnull public Context setHost(@Nonnull String host)
Context
host
header.public int getServerPort()
Context
getServerPort
in interface Context
@Nonnull public String getServerHost()
Context
getServerHost
in interface Context
public int getPort()
Context
Context.getServerPort()
.@Nonnull public Context setPort(int port)
Context
@Nonnull public String getHostAndPort()
Context
Router.setTrustProxy(boolean)
option.getHostAndPort
in interface Context
@Nonnull public String getRequestURL()
Context
Host
header.
If you run behind a reverse proxy that has been configured to send the X-Forwarded-* header,
please consider to set Router.setTrustProxy(boolean)
option.getRequestURL
in interface Context
Host
header.@Nonnull public String getRequestURL(@Nonnull String path)
Context
Host
header with a custom path/suffix.
If you run behind a reverse proxy that has been configured to send the X-Forwarded-* header,
please consider to set Router.setTrustProxy(boolean)
option.getRequestURL
in interface Context
path
- Path or suffix to use, can also include query string parameters.Host
header.@Nonnull public String getProtocol()
Context
getProtocol
in interface Context
@Nonnull public List<Certificate> getClientCertificates()
Context
getClientCertificates
in interface Context
@Nonnull public String getScheme()
Context
@Nonnull public Context setScheme(@Nonnull String scheme)
Context
@Nonnull public Formdata form()
Context
ValueNode
. This method is for application/form-url-encoded
request.@Nonnull public Map<String,List<String>> formMultimap()
Context
application/form-url-encoded
request.formMultimap
in interface Context
application/form-url-encoded
request.@Nonnull public Map<String,String> formMap()
Context
application/form-url-encoded
request.@Nonnull public ValueNode form(@Nonnull String name)
Context
application/form-url-encoded
request.@Nonnull public <T> T form(@Nonnull Class<T> type)
Context
application/form-url-encoded
request.@Nonnull public Multipart multipart()
Context
multipart/form-data
request..@Nonnull public ValueNode multipart(@Nonnull String name)
Context
Context.file(String)
.
Only for multipart/form-data
request.@Nonnull public <T> T multipart(@Nonnull Class<T> type)
Context
multipart/form-data
request.@Nonnull public Map<String,List<String>> multipartMultimap()
Context
multipart/form-data
request.multipartMultimap
in interface Context
@Nonnull public Map<String,String> multipartMap()
Context
multipart/form-data
request.multipartMap
in interface Context
@Nonnull public List<FileUpload> files()
Context
multipart/form-data
request.@Nonnull public List<FileUpload> files(@Nonnull String name)
Context
multipart/form-data
request.@Nonnull public FileUpload file(@Nonnull String name)
Context
multipart/form-data
request.@Nonnull public Body body()
Context
@Nonnull public <T> T body(@Nonnull Class<T> type)
Context
@Nonnull public <T> T body(@Nonnull Type type)
Context
@Nonnull public <T> T convert(@Nonnull ValueNode value, @Nonnull Class<T> type)
Context
@Nonnull public <T> T decode(@Nonnull Type type, @Nonnull MediaType contentType)
Context
@Nonnull public MessageDecoder decoder(@Nonnull MediaType contentType)
Context
StatusCode.UNSUPPORTED_MEDIA_TYPE
.public boolean isInIoThread()
Context
isInIoThread
in interface Context
@Nonnull public Context dispatch(@Nonnull Runnable action)
Context
Jooby.setWorker(Executor)
.
Example:
get("/", ctx -> {
return ctx.dispatch(() -> {
// run blocking code
}):
});
@Nonnull public Context dispatch(@Nonnull Executor executor, @Nonnull Runnable action)
Context
Executor executor = ...;
get("/", ctx -> {
return ctx.dispatch(executor, () -> {
// run blocking code
}):
});
@Nonnull public Context detach(@Nonnull Route.Handler next) throws Exception
Context
Context.dispatch(Runnable)
except there is no thread dispatching here.
This operation integrates easily with third-party libraries like rxJava or others.@Nonnull public Context upgrade(@Nonnull WebSocket.Initializer handler)
Context
@Nonnull public Context upgrade(@Nonnull ServerSentEmitter.Handler handler)
Context
@Nonnull public Context setResponseHeader(@Nonnull String name, @Nonnull Date value)
Context
setResponseHeader
in interface Context
name
- Header name.value
- Header value.@Nonnull public Context setResponseHeader(@Nonnull String name, @Nonnull Instant value)
Context
setResponseHeader
in interface Context
name
- Header name.value
- Header value.@Nonnull public Context setResponseHeader(@Nonnull String name, @Nonnull Object value)
Context
setResponseHeader
in interface Context
name
- Header name.value
- Header value.@Nonnull public Context setResponseHeader(@Nonnull String name, @Nonnull String value)
Context
setResponseHeader
in interface Context
name
- Header name.value
- Header value.@Nonnull public Context removeResponseHeader(@Nonnull String name)
Context
removeResponseHeader
in interface Context
name
- Header's name.@Nonnull public Context removeResponseHeaders()
Context
removeResponseHeaders
in interface Context
@Nullable public String getResponseHeader(@Nonnull String name)
Context
getResponseHeader
in interface Context
name
- Header's name.null
.public long getResponseLength()
Context
-1
when none was set.getResponseLength
in interface Context
-1
when none was set.@Nonnull public Context setResponseLength(long length)
Context
setResponseLength
in interface Context
length
- Response length.@Nonnull public Context setResponseCookie(@Nonnull Cookie cookie)
Context
setResponseCookie
in interface Context
cookie
- Cookie to add.@Nonnull public Context setResponseType(@Nonnull String contentType)
Context
setResponseType
in interface Context
contentType
- Content type.@Nonnull public Context setResponseType(@Nonnull MediaType contentType)
Context
setResponseType
in interface Context
contentType
- Content type.@Nonnull public Context setResponseType(@Nonnull MediaType contentType, @Nullable Charset charset)
Context
setResponseType
in interface Context
contentType
- Content type.charset
- Charset.@Nonnull public Context setDefaultResponseType(@Nonnull MediaType contentType)
Context
setDefaultResponseType
in interface Context
contentType
- Content type.@Nonnull public MediaType getResponseType()
Context
getResponseType
in interface Context
@Nonnull public Context setResponseCode(@Nonnull StatusCode statusCode)
Context
setResponseCode
in interface Context
statusCode
- Status code.@Nonnull public Context setResponseCode(int statusCode)
Context
setResponseCode
in interface Context
statusCode
- Status code.@Nonnull public StatusCode getResponseCode()
Context
getResponseCode
in interface Context
@Nonnull public Context render(@Nonnull Object value)
Context
@Nonnull public OutputStream responseStream()
Context
responseStream
in interface Context
@Nonnull public OutputStream responseStream(@Nonnull MediaType contentType)
Context
responseStream
in interface Context
contentType
- Media type.@Nonnull public Context responseStream(@Nonnull MediaType contentType, @Nonnull SneakyThrows.Consumer<OutputStream> consumer) throws Exception
Context
responseStream
in interface Context
contentType
- Content type.consumer
- Output stream consumer.Exception
- Is something goes wrong.@Nonnull public Context responseStream(@Nonnull SneakyThrows.Consumer<OutputStream> consumer) throws Exception
Context
responseStream
in interface Context
consumer
- Output stream consumer.Exception
- Is something goes wrong.@Nonnull public Sender responseSender()
Context
responseSender
in interface Context
@Nonnull public PrintWriter responseWriter()
Context
responseWriter
in interface Context
@Nonnull public PrintWriter responseWriter(@Nonnull MediaType contentType)
Context
responseWriter
in interface Context
contentType
- Content type.@Nonnull public PrintWriter responseWriter(@Nonnull MediaType contentType, @Nullable Charset charset)
Context
responseWriter
in interface Context
contentType
- Content type.charset
- Charset.@Nonnull public Context responseWriter(@Nonnull SneakyThrows.Consumer<PrintWriter> consumer) throws Exception
Context
responseWriter
in interface Context
consumer
- Writer consumer.Exception
- Is something goes wrong.@Nonnull public Context responseWriter(@Nonnull MediaType contentType, @Nonnull SneakyThrows.Consumer<PrintWriter> consumer) throws Exception
Context
responseWriter
in interface Context
contentType
- Content type.consumer
- Writer consumer.Exception
- Is something goes wrong.@Nonnull public Context responseWriter(@Nonnull MediaType contentType, @Nullable Charset charset, @Nonnull SneakyThrows.Consumer<PrintWriter> consumer) throws Exception
Context
responseWriter
in interface Context
contentType
- Content type.charset
- Charset.consumer
- Writer consumer.Exception
- Is something goes wrong.@Nonnull public Context sendRedirect(@Nonnull String location)
Context
302
response.sendRedirect
in interface Context
location
- Location.@Nonnull public Context sendRedirect(@Nonnull StatusCode redirect, @Nonnull String location)
Context
sendRedirect
in interface Context
redirect
- Redirect status code.location
- Location.@Nonnull public Context send(@Nonnull String data)
Context
@Nonnull public Context send(@Nonnull String data, @Nonnull Charset charset)
Context
@Nonnull public Context send(@Nonnull byte[] data)
Context
@Nonnull public Context send(@Nonnull ByteBuffer data)
Context
@Nonnull public Context send(@Nonnull byte[]... data)
Context
@Nonnull public Context send(@Nonnull ByteBuffer[] data)
Context
@Nonnull public Context send(@Nonnull ReadableByteChannel channel)
Context
@Nonnull public Context send(@Nonnull InputStream input)
Context
@Nonnull public Context send(@Nonnull FileDownload file)
Context
@Nonnull public Context send(@Nonnull Path file)
Context
@Nonnull public Context send(@Nonnull FileChannel file)
Context
@Nonnull public Context send(@Nonnull StatusCode statusCode)
Context
@Nonnull public Context sendError(@Nonnull Throwable cause)
Context
Router.errorCode(Throwable)
.@Nonnull public Context sendError(@Nonnull Throwable cause, @Nonnull StatusCode code)
Context
public boolean isResponseStarted()
Context
isResponseStarted
in interface Context
public boolean getResetHeadersOnError()
Context
RouterOption.RESET_HEADERS_ON_ERROR
.getResetHeadersOnError
in interface Context
RouterOption.RESET_HEADERS_ON_ERROR
.public Context setResetHeadersOnError(boolean value)
Context
setResetHeadersOnError
in interface Context
value
- True for reset/clear headers.@Nonnull public Context onComplete(@Nonnull Route.Complete task)
Context
onComplete
in interface Context
task
- Task to execute.@Nonnull public <T> T require(@Nonnull Class<T> type) throws RegistryException
Registry
require
in interface Registry
T
- Object type.type
- Object type.RegistryException
- If there was a runtime failure while providing an instance.@Nonnull public <T> T require(@Nonnull Class<T> type, @Nonnull String name) throws RegistryException
Registry
require
in interface Registry
T
- Object type.type
- Object type.name
- Object name.RegistryException
- If there was a runtime failure while providing an instance.@Nonnull public <T> T require(@Nonnull ServiceKey<T> key) throws RegistryException
Registry
require
in interface Registry
T
- Object type.key
- Object key.RegistryException
- If there was a runtime failure while providing an instance.Copyright © 2022. All rights reserved.