public void writeResponse(MaybeReq req, Channel ctx, boolean isKeepAlive, int code, MediaType contentTypeHeader, byte[] content) { impl.writeResponse(req, ctx, isKeepAlive, code, contentTypeHeader, content); }
void write200(MaybeReq req, Channel ctx, boolean isKeepAlive, MediaType contentTypeHeader, byte[] content) { writeResponse(req, ctx, isKeepAlive, 200, contentTypeHeader, content); }
void writeHttpResp(final MaybeReq req, final Channel ctx, final boolean isKeepAlive, int code, final MediaType contentType, final Object value) { Object result = value; Resp resp = respOrNull(req); if (resp != null) { if (resp.body() != null) { byte[] bytes = Msc.toBytes(resp.body()); writeResponse(req, ctx, isKeepAlive, code, contentType, bytes); return; } else if (resp.result() != null) { result = resp.result(); } } if (contentType == MediaType.JSON) { writeJsonResponse(req, resp, ctx, isKeepAlive, code, contentType, result); } else { byte[] bytes = Msc.toBytes(result); writeResponse(req, ctx, isKeepAlive, code, contentType, bytes); } }
public void writeResponse(MaybeReq req, Channel ctx, boolean isKeepAlive, int code, MediaType contentTypeHeader, byte[] content) { impl.writeResponse(req, ctx, isKeepAlive, code, contentTypeHeader, content); }
void write200(MaybeReq req, Channel ctx, boolean isKeepAlive, MediaType contentTypeHeader, byte[] content) { writeResponse(req, ctx, isKeepAlive, 200, contentTypeHeader, content); }
void writeHttpResp(final MaybeReq req, final Channel ctx, final boolean isKeepAlive, int code, final MediaType contentType, final Object value) { Object result = value; Resp resp = respOrNull(req); if (resp != null) { if (resp.body() != null) { byte[] bytes = Msc.toBytes(resp.body()); writeResponse(req, ctx, isKeepAlive, code, contentType, bytes); return; } else if (resp.result() != null) { result = resp.result(); } } if (contentType == MediaType.JSON) { writeJsonResponse(req, resp, ctx, isKeepAlive, code, contentType, result); } else { byte[] bytes = Msc.toBytes(result); writeResponse(req, ctx, isKeepAlive, code, contentType, bytes); } }