Package | Description |
---|---|
ratpack.error |
Types that deal with handling application errors.
|
ratpack.handling |
The handling of application requests.
|
ratpack.http |
The HTTP protocol.
|
ratpack.promise |
Promises are strategy builders for the result of async operations.
|
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,
Exception exception)
Processes the given exception that occurred processing the given context.
|
Modifier and Type | Method and Description |
---|---|
void |
Context.clientError(int statusCode)
Forwards the error to the
ClientErrorHandler in this service. |
void |
ReadOnlyContext.error(Exception exception)
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.
|
void |
Context.respond(Handler handler)
Convenience method for delegating to a single handler.
|
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(InputStream inputStream)
Sends the response, using "
application/octet-stream " as the content type (if a content type hasn't
already been set) and the contents of the given input stream 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.send(String contentType,
byte[] bytes)
Sends the response, using the given content type and byte array as the response body.
|
void |
Response.send(String contentType,
ByteBuf buffer)
Sends the response, using the given content type and bytes as the response body.
|
void |
Response.send(String contentType,
InputStream inputStream)
Sends the response, using the given content type and the content of the given input stream as the response body.
|
void |
Response.send(String contentType,
String body)
Sends the response, using the given content type and string as the response body.
|
void |
Response.sendFile(Background background,
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(Background background,
Path file)
Sends the response, using the given content type and the content of the given type as the response body.
|
Modifier and Type | Method and Description |
---|---|
void |
SuccessPromise.then(Action<? super T> then)
Specifies what should be done with the promised object when it is ready.
|
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 |
WebSocketBuilder.connect() |
void |
WebSocket.send(String text) |