Package | Description |
---|---|
ratpack.codahale.metrics |
Integration with Coda Hale's Metrics Library.
|
ratpack.error |
Types that deal with handling application errors.
|
ratpack.groovy |
Support for writing Ratpack applications in the Groovy programming language.
|
ratpack.groovy.handling |
Groovy specific extensions to classes in the
ratpack.handling package. |
ratpack.groovy.render |
Specialised Groovy support for rendering.
|
ratpack.handling |
The handling of application requests.
|
ratpack.pac4j |
Integration with pac4j for authentication/authorization.
|
ratpack.parse |
Parsing in Ratpack refers to deserializing a request body into a Java object of some type.
|
ratpack.render |
The renderer framework provides a pluggable mechanism for serializing objects to the response.
|
ratpack.server |
Objects used to start a ratpack application.
|
ratpack.websocket |
Support for Websockets.
|
Modifier and Type | Method and Description |
---|---|
void |
HealthCheckHandler.handle(Context context) |
void |
MetricsWebsocketBroadcastHandler.handle(Context context) |
Modifier and Type | Method and Description |
---|---|
void |
ClientErrorHandler.error(Context context,
int statusCode)
Handle a client error.
|
void |
DebugErrorHandler.error(Context context,
int statusCode)
Prints the string "Client error «statusCode»" to the response as text with the given status code.
|
void |
DebugErrorHandler.error(Context context,
Throwable throwable)
Prints the stacktrace of the given exception to the response with a 500 status. |
void |
ServerErrorHandler.error(Context context,
Throwable throwable)
Processes the given exception that occurred processing the given context.
|
Modifier and Type | Method and Description |
---|---|
static GroovyContext |
Groovy.context(Context context)
Creates a specialized Groovy context.
|
Modifier and Type | Interface and Description |
---|---|
interface |
GroovyContext
Subclass of
Context that adds Groovy friendly variants of methods. |
Modifier and Type | Method and Description |
---|---|
void |
GroovyHandler.handle(Context context)
Delegates to
GroovyHandler.handle(GroovyContext) . |
Modifier and Type | Method and Description |
---|---|
void |
GroovyRendererSupport.render(Context context,
T object)
Delegates to
GroovyRendererSupport.render(GroovyContext, Object) , wrapping the given context in a GroovyContext . |
Modifier and Type | Method and Description |
---|---|
Context |
Context.getContext()
Returns this.
|
Modifier and Type | Method and Description |
---|---|
void |
Handler.handle(Context context)
Handles the context.
|
void |
InjectionHandler.handle(Context context)
Invokes the custom "handle" method, extracting necessary parameters from the context to satisfy the call.
|
void |
Redirector.redirect(Context context,
String location,
int code)
Issue a redirect to the client.
|
Modifier and Type | Method and Description |
---|---|
void |
AbstractAuthorizer.handleAuthorization(Context context,
UserProfile userProfile)
Unless overridden, all authenticated requests will be considered authorized.
|
void |
Authorizer.handleAuthorization(Context context,
UserProfile userProfile)
Handles authorization for the given context.
|
boolean |
Authorizer.isAuthenticationRequired(Context context)
Determines whether authentication is required for a given context.
|
Modifier and Type | Method and Description |
---|---|
<T> T |
NoOptParserSupport.parse(Context context,
TypedData requestBody,
Parse<T,NullParseOpts> parse)
Delegates to
NoOptParserSupport.parse(ratpack.handling.Context, ratpack.http.TypedData, TypeToken) , discarding the opts object of the given parse . |
<T> T |
Parser.parse(Context context,
TypedData requestBody,
Parse<T,O> parse)
Deserializes the request body of the context into an object.
|
protected abstract <T> T |
NoOptParserSupport.parse(Context context,
TypedData requestBody,
TypeToken<T> type)
The parser implementation.
|
Modifier and Type | Method and Description |
---|---|
void |
Renderer.render(Context context,
T object)
Render the given object to the response.
|
abstract void |
RendererSupport.render(Context context,
T t)
Render the given object to the response.
|
Modifier and Type | Method and Description |
---|---|
URI |
PublicAddress.getAddress(Context context)
The advertised public address.
|
Modifier and Type | Method and Description |
---|---|
static <T> WebSocketConnector<T> |
WebSockets.websocket(Context context,
Function<WebSocket,T> openAction) |
static void |
WebSockets.websocket(Context context,
WebSocketHandler<?> handler) |
static void |
WebSockets.websocketBroadcast(Context context,
org.reactivestreams.Publisher<String> broadcaster) |