1package dev.rafex.ether.http.jetty12;
29import java.util.Objects;
31import org.eclipse.jetty.server.Response;
32import org.eclipse.jetty.util.Callback;
34import dev.rafex.ether.json.JsonCodec;
41 this.jsonCodec = Objects.requireNonNull(jsonCodec);
44 public void json(
final Response response,
final Callback callback,
final int status,
final Object body) {
45 JettyResponseUtil.json(response, callback, jsonCodec, status, body);
48 public void jsonOrThrow(
final Response response,
final Callback callback,
final int status,
final Object body)
50 JettyResponseUtil.jsonOrThrow(response, callback, jsonCodec, status, body);
53 public void text(
final Response response,
final Callback callback,
final int status,
final String body) {
54 JettyResponseUtil.text(response, callback, status, body);
57 public void noContent(
final Response response,
final Callback callback,
final int status) {
58 JettyResponseUtil.noContent(response, callback, status);
61 public void ok(
final Response response,
final Callback callback,
final Object body) {
62 json(response, callback, 200, body);
65 public void created(
final Response response,
final Callback callback,
final Object body) {
66 json(response, callback, 201, body);
69 public void okNoContent(
final Response response,
final Callback callback) {
void okNoContent(final Response response, final Callback callback)
void noContent(final Response response, final Callback callback, final int status)
void json(final Response response, final Callback callback, final int status, final Object body)
void created(final Response response, final Callback callback, final Object body)
JettyApiResponses(final JsonCodec jsonCodec)
void text(final Response response, final Callback callback, final int status, final String body)
void jsonOrThrow(final Response response, final Callback callback, final int status, final Object body)
void ok(final Response response, final Callback callback, final Object body)