Package | Description |
---|---|
ratpack.error |
Types that deal with handling application errors.
|
ratpack.exec |
The execution management.
|
ratpack.handling |
The handling of application requests.
|
ratpack.http |
The HTTP protocol.
|
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 |
ServerErrorHandler.error(Context context,
Throwable throwable)
Processes the given exception that occurred processing the given context.
|
Modifier and Type | Method and Description |
---|---|
void |
Fulfiller.error(Throwable throwable)
Fulfills the promise with an error result.
|
void |
Fulfiller.success(T value)
Fulfills the promise with the given value.
|
void |
SuccessPromise.then(Action<? super T> then)
Specifies what should be done with the promised object when it becomes available.
|
Modifier and Type | Method and Description |
---|---|
void |
Context.byMethod(Action<? super ByMethodSpec> action)
Respond to the request based on the request method.
|
void |
Context.clientError(int statusCode)
Forwards the error to the
ClientErrorHandler in this service. |
void |
Context.error(Throwable throwable)
Forwards the exception to the
ServerErrorHandler in this service. |
void |
Handler.handle(Context context)
Handles the context.
|
void |
Context.insert(Handler... handlers)
Inserts some handlers into the pipeline, then delegates to the first.
|
void |
Context.insert(Registry registry,
Handler... handlers)
Inserts some handlers into the pipeline to execute with the given registry, then delegates to the first.
|
void |
Context.lastModified(Date date,
Runnable runnable)
Convenience method for handling last-modified based HTTP caching.
|
void |
Context.next()
Delegate handling to the next handler in line.
|
void |
Context.next(Registry registry)
Invokes the next handler, after adding the given registry.
|
void |
Redirector.redirect(Context context,
String location,
int code)
Issue a redirect to the client.
|
void |
Context.render(Object object)
Render the given object, using the rendering framework.
|
Modifier and Type | Method and Description |
---|---|
void |
Response.send()
Sends the response back to the client, with no body.
|
void |
Response.send(byte[] bytes)
Sends the response, using "
application/octet-stream " as the content type (if a content type hasn't
already been set) and the given byte array as the response body. |
void |
Response.send(ByteBuf buffer)
Sends the response, using "
application/octet-stream " as the content type (if a content type hasn't
already been set) and the given bytes as the response body. |
void |
Response.send(CharSequence contentType,
byte[] bytes)
Sends the response, using the given content type and byte array as the response body.
|
void |
Response.send(CharSequence contentType,
ByteBuf buffer)
Sends the response, using the given content type and bytes as the response body.
|
void |
Response.send(CharSequence contentType,
String body)
Sends the response, using the given content type and string as the response body.
|
void |
Response.send(String text)
Sends the response, using "
text/plain " as the content type and the given string as the response body. |
void |
Response.sendFile(BasicFileAttributes attributes,
Path file)
Sends the response, using the given content type and the content of the given type as the response body.
|
void |
Response.sendFile(Path file)
Sends the response, using the given content type and the content of the given type as the response body.
|
void |
Response.sendStream(org.reactivestreams.Publisher<? extends ByteBuf> stream)
Sends the response, streaming the bytes emitted by the given publisher.
|
Modifier and Type | Method and Description |
---|---|
void |
Renderer.render(Context context,
T object)
Render the given object to the response.
|
Modifier and Type | Method and Description |
---|---|
void |
Stopper.stop()
Initiates the shutdown process for the running application.
|
Modifier and Type | Method and Description |
---|---|
void |
WebSocket.close() |
void |
WebSocket.close(int statusCode,
String reason) |
void |
WebSocket.send(ByteBuf text) |
void |
WebSocket.send(String text) |