Package | Description |
---|---|
ratpack.handling |
The handling of application requests.
|
ratpack.registry |
Registries hold objects that can be retrieved via type, and are a key aspect of Ratpack applications.
|
Modifier and Type | Method and Description |
---|---|
void |
Context.clientError(int statusCode)
Forwards the error to the
ClientErrorHandler in this service. |
Path |
Context.file(String path)
Gets the file relative to the contextual
FileSystemBinding . |
PathTokens |
Context.getAllPathTokens()
The contextual path tokens of the current
PathBinding . |
PathTokens |
Context.getPathTokens()
The contextual path tokens of the current
PathBinding . |
void |
Context.redirect(int code,
String location)
Sends a redirect response location URL and status code (which should be in the 3xx range).
|
void |
Context.redirect(String location)
Sends a temporary redirect response (i.e.
|
Modifier and Type | Method and Description |
---|---|
default <O> O |
Registry.get(Class<O> type)
Provides an object of the specified type, or throws an exception if no object of that type is available.
|
default <O> O |
Registry.get(TypeToken<O> type)
Provides an object of the specified type, or throws an exception if no object of that type is available.
|
default <T> void |
MutableRegistry.remove(Class<T> type)
Remove the registration for the given type.
|
<T> void |
MutableRegistry.remove(TypeToken<T> type)
Remove the registration for the given type.
|