Uses of Class
org.apache.juneau.rest.server.RestResponse
Packages that use RestResponse
Package
Description
Server half of the console message bus.
Server helpers for console data sources:
SeriesSource streams
rows as CSV or NDJSON, and SeriesAggregator answers the
aggregate request a data source sends when its result is too large to load raw.A typed, declarative "rich DataTables view" toolkit that serializes to the frozen
VIEW_META JSON wire
contract consumed by the first-party client runtime.Example / demo Microservice REST Resources
Petstore admin console: the
/console page tree.Petstore console Developer pages: custom cards, themes, rendering flavors and the secure API demo.
Petstore console operations pages: background jobs and the audit log.
Petstore console pets pages and their JSON endpoints.
REST Server API
REST Method Argument Beans
Authentication (AuthN) guards, servlet-layer filters, SPIs, and request-time helpers for
juneau-rest-server.Convention-endpoints mixin pack — composable
@Rest(mixins=...) resources that ship the
"internet conventions" surface (favicon, robots, sitemap, version, well-known) every public-facing
service eventually grows.API-docs mixin pack — composable
@Rest(mixins=...) resources that publish Swagger v2
and OpenAPI 3.1 spec endpoints with Swagger-UI and Redoc HTML mounts.REST Guards
Built-in health, readiness, and liveness probe support for Juneau REST servers.
JUL-level-driven REST debug logging API.
Actuator-style management-surface endpoints (server-module flavors).
Ops / introspection mixin pack — composable
@Rest(mixins=...) resources that ship the
operational surface (request echo, JVM admin, route index) every long-running Juneau service
eventually grows.REST Servlets
Server-Sent Events (SSE) support for Juneau REST servers.
Engine-agnostic server-side-rendered view extension point.
Apache FreeMarker view-rendering bridge — opt-in
juneau-rest-server-view-freemarker
module.JSP view-rendering bridge — opt-in
juneau-rest-server-view-jsp module.Mustache view-rendering bridge — opt-in
juneau-rest-server-view-mustache module.Thymeleaf view-rendering bridge — opt-in
juneau-rest-server-view-thymeleaf module.HTML Widget API
Raw command output in the browser: a byte-offset endpoint over a
TerminalSource
and an xterm.js panel that renders it the way a terminal would.-
Uses of RestResponse in org.apache.juneau.console.bus
Methods in org.apache.juneau.console.bus with parameters of type RestResponseModifier and TypeMethodDescriptiondefault JsonMapBusEventsMixin.openBusSession(RestRequest req, RestResponse res) [POST /juneau-bus/session] — opens a bus session.default voidBusEventsMixin.streamBus(String id, RestRequest req, RestResponse res) [GET /juneau-bus/stream/{sessionId}] — streams the session's frames as Server-Sent Events. -
Uses of RestResponse in org.apache.juneau.console.data
Methods in org.apache.juneau.console.data with parameters of type RestResponseModifier and TypeMethodDescriptionstatic SeriesSourceSeriesSource.csv(RestResponse res) A CSV streamer on the response: setstext/csv;charset=utf-8 andX-Content-Type-Options: nosniff .static SeriesSourceSeriesSource.ndjson(RestResponse res) An NDJSON streamer on the response: setsapplication/x-ndjson;charset=utf-8 andnosniff .voidSeriesAggregator.Result.writeTo(RestResponse res) Writes the body asapplication/json withnosniff . -
Uses of RestResponse in org.apache.juneau.console.views
Methods in org.apache.juneau.console.views with parameters of type RestResponseModifier and TypeMethodDescriptiondefault ActionResultAsyncJobsMixin.cancelJob(String jobId, RestResponse res) [POST /juneau-jobs/{jobId}/cancel] — cancel a job and return its terminal result.static voidTerminalViewEndpoints.events(Optional<TerminalViewSource> source, RestRequest req, RestResponse res) Serves one page of the events endpoint (?after=) as JSON.default voidAsyncJobsMixin.streamJob(String jobId, RestRequest req, RestResponse res) [GET /juneau-jobs/{jobId}/stream] — stream a job's progress as Server-Sent Events.default voidTerminalViewMixin.terminalViewEvents(String runId, RestRequest req, RestResponse res) [GET /juneau-terminal-view/{runId}/events] — one page of events as JSON. -
Uses of RestResponse in org.apache.juneau.microservice.examples
Methods in org.apache.juneau.microservice.examples with parameters of type RestResponseModifier and TypeMethodDescriptionDebugResource.createJettyDump(RestRequest req, RestResponse res) [POST /jetty/dump] - Generates and saves the jetty thread dump file to jetty-thread-dump.log.org.apache.juneau.microservice.examples.DirectoryResource.FileContentsDirectoryResource.downloadFile(RestResponse res, String path) Downloads the contents of a file.org.apache.juneau.microservice.examples.LogsResource.FileContentsLogsResource.downloadFile(RestResponse res, String path) Downloads the contents of a file.DebugResource.getJettyDump(RestRequest req, RestResponse res) [GET /jetty/dump] - Generates and retrieves the jetty thread dump.org.apache.juneau.microservice.examples.DirectoryResource.FileContentsDirectoryResource.viewFile(RestResponse res, String path) Views the contents of a file.voidLogsResource.viewFile(RestResponse res, String path, boolean highlight, String start, String end, String thread, String[] loggers, String[] severity) Views the contents of a log file with optional filtering. -
Uses of RestResponse in org.apache.juneau.petstore.console
Methods in org.apache.juneau.petstore.console with parameters of type RestResponseModifier and TypeMethodDescriptionvoidPetstoreConsoleResource.script(RestResponse res) Servespetstore.js, the shared page scriptbase.ftlhloads after the toolkit on every page. -
Uses of RestResponse in org.apache.juneau.petstore.console.dev
Methods in org.apache.juneau.petstore.console.dev with parameters of type RestResponseModifier and TypeMethodDescriptionvoidDataRest.orders(String start, String end, RestResponse res) Hourly order counts in the window.voidCustomCardsRest.script(RestResponse res) Serves the page-local script.voidDashboardRest.script(RestResponse res) Serves the page-local script (thepetstore.laterail section).voidDataRest.script(RestResponse res) Serves the page-local script.voidSecureRest.script(RestResponse res) Serves the page-local script.voidDashboardRest.series(RestRequest req, RestResponse res, String variant, String q, String start, String end, String lateOnly) Theorderssource:day,reason,orders, one row per UTC day. -
Uses of RestResponse in org.apache.juneau.petstore.console.ops
Methods in org.apache.juneau.petstore.console.ops with parameters of type RestResponseModifier and TypeMethodDescriptionJobsRest.regroom(RestRequest req, RestResponse res, String id, JsonMap json) Grooms a run's pet again.JobsRest.restock(RestRequest req, RestResponse res, JsonMap json) Submits a restock.JobsRest.restockSpecies(RestRequest req, RestResponse res, String id, JsonMap json) Restocks one species from its row's detail panel. -
Uses of RestResponse in org.apache.juneau.petstore.console.pets
Methods in org.apache.juneau.petstore.console.pets with parameters of type RestResponseModifier and TypeMethodDescriptionPetsRest.detailOrder(RestRequest req, RestResponse res, long id, long orderId) P4 at nav depth 4: the Orders tab with one of this pet's orders selected.PetsRest.detailTab(RestRequest req, RestResponse res, long id, String tab) P4, one tab. -
Uses of RestResponse in org.apache.juneau.rest.server
Methods in org.apache.juneau.rest.server that return RestResponseModifier and TypeMethodDescriptionRestResponse.addHeader(HttpHeader header) Adds a response header.RestResponse.cacheControl(String value) Sets theCache-Control response header to the supplied directive string.RestResponse.cacheControl(CacheControl.Builder value) Sets theCache-Control response header from aCacheControl.Builder.RestOpContext.createResponse(RestSession session, RestRequest req) Creates aRestResponseobject based on the specified incomingHttpServletResponseobject and the request returned byRestOpContext.createRequest(RestSession).RestResponse.downloadAs(String filename) SetsContent-Disposition toattachment so browsers typically download the body, using the given suggested file name (quotedfilenameparameter).Sets theETag response header to the supplied wire value.Sets theETag response header to the canonical wire form of the suppliedEntityTag.RestOpSession.getResponse()Returns the REST response object for this session.RestRequest.getResponse()Returns the HTTP response associated with this request.RestResponse.lastModified(Instant value) Sets theLast-Modified response header to the supplied instant formatted as an RFC 7231 IMF-fixdate.RestResponse.lastModified(ZonedDateTime value) Sets theLast-Modified response header to the supplied date-time formatted as an RFC 7231 IMF-fixdate.RestResponse.sendPlainText(String text) Sets the output to a plain-text message regardless of the content type.RestResponse.setAttribute(String name, Object value) Shortcut for callinggetRequest().setAttribute(String,Object) .RestResponse.setContent(Object output) Sets the HTTP output on the response.RestResponse.setContentSchema(HttpPartSchema schema) Specifies the schema for the response content.RestResponse.setException(Throwable t) Sets the"Exception" attribute to the specified throwable.Sets a header on the request.RestResponse.setHeader(HttpHeader header) Sets a response header.RestResponse.setHeader(HttpPartSchema schema, String name, Object value) Sets a header on the request.RestResponse.setMaxHeaderLength(int value) Specifies the maximum length for header values.RestResponse.setNoTrace()Shortcut for callingsetNoTrace( .true )RestResponse.setNoTrace(Boolean b) Sets the"NoTrace" attribute to the specified boolean.RestResponse.setResponseBeanMeta(ResponseBeanMeta rbm) Sets metadata about this response.RestResponse.setSafeHeaders()Enables safe-header mode.RestResponse.setSerializer(Serializer value) Forces theSerializerused to serialize the response body set viasetContent(Object)(or an equivalent return from the REST method), instead of choosing one from theAccept header.RestResponse.setUnsafeHeaders()Disables safe-header mode, restoring the pre-hardening behavior of passing header values through to the underlyingHttpServletResponseverbatim (aside from the usualsetMaxHeaderLength(int)truncation).Methods in org.apache.juneau.rest.server with parameters of type RestResponseModifier and TypeMethodDescriptionRestRequest.checkPreconditions(RestResponse response) Evaluates the conditional-request headers on this request against the response's currently-setETag andLast-Modified values. -
Uses of RestResponse in org.apache.juneau.rest.server.arg
Constructor parameters in org.apache.juneau.rest.server.arg with type arguments of type RestResponseModifierConstructorDescriptionprotectedRestResponseArgs(ThrowingFunction<RestResponse, T> function) Constructor. -
Uses of RestResponse in org.apache.juneau.rest.server.auth
Methods in org.apache.juneau.rest.server.auth with parameters of type RestResponseModifier and TypeMethodDescriptionbooleanApiKeyGuard.guard(RestRequest req, RestResponse res) booleanBearerTokenGuard.guard(RestRequest req, RestResponse res) -
Uses of RestResponse in org.apache.juneau.rest.server.convention
Methods in org.apache.juneau.rest.server.convention with parameters of type RestResponseModifier and TypeMethodDescriptionvoidVersionMixin.getInfo(RestResponse res) [GET /version] — emit the assembled metadata as a JSON map.voidVersionResource.getInfo(RestResponse res) [GET /*] — emit the assembled metadata as a JSON map.voidVersionServlet.getInfo(RestResponse res) [GET /*] — emit the assembled metadata as a JSON map.voidSeoMixin.getRobotsTxt(RestResponse res) [GET /robots.txt] — emit the configured robots policy astext/plain.voidWellKnownMixin.getSecurityTxt(RestResponse res) [GET /.well-known/security.txt] — emit the configured RFC 9116 body, or 404 when unset.voidSeoMixin.getSitemap(RestResponse res) [GET /sitemap.xml] — emit the configured sitemap asapplication/xml.voidVersionProvider.serve(RestResponse res) Serves the assembled metadata as a JSON map. -
Uses of RestResponse in org.apache.juneau.rest.server.docs
Methods in org.apache.juneau.rest.server.docs with parameters of type RestResponseModifier and TypeMethodDescriptionvoidOpenApiMixin.getOpenApiJson(RestRequest req, RestResponse res) [GET /openapi.json] — emit the OpenAPI 3.1 document as JSON, ignoring theAcceptheader.voidOpenApiMixin.getOpenApiYaml(RestRequest req, RestResponse res) [GET /openapi.yaml] — emit the OpenAPI 3.1 document as YAML, ignoring theAcceptheader. -
Uses of RestResponse in org.apache.juneau.rest.server.guard
Methods in org.apache.juneau.rest.server.guard with parameters of type RestResponseModifier and TypeMethodDescriptionbooleanRateLimitGuard.guard(RestRequest req, RestResponse res) booleanRestGuard.guard(RestRequest req, RestResponse res) Checks the current HTTP request and throws aBasicHttpExceptionif the guard does not permit the request. -
Uses of RestResponse in org.apache.juneau.rest.server.health
Methods in org.apache.juneau.rest.server.health with parameters of type RestResponseModifier and TypeMethodDescriptionHealthAggregator.aggregate(RestContext context, Map<String, HealthIndicator> indicators, HealthProbe probe, RestResponse res) Evaluates the supplied indicators, summarizes their statuses, and sets the response status.HealthMixin.healthz(RestRequest req, RestResponse res) Health probe endpoint.HealthResource.healthz(RestRequest req, RestResponse res) Health probe endpoint.HealthMixin.livez(RestRequest req, RestResponse res) Liveness probe endpoint.HealthResource.livez(RestRequest req, RestResponse res) Liveness probe endpoint.HealthServlet.probe(RestRequest req, RestResponse res) Health/readiness/liveness probe endpoint.HealthMixin.readyz(RestRequest req, RestResponse res) Readiness probe endpoint.HealthResource.readyz(RestRequest req, RestResponse res) Readiness probe endpoint. -
Uses of RestResponse in org.apache.juneau.rest.server.logging
Methods in org.apache.juneau.rest.server.logging with parameters of type RestResponseModifier and TypeMethodDescriptionBasicRestDebugFormatter.formatBasic(RestRequest req, RestResponse res) RestDebugFormatter.formatBasic(RestRequest req, RestResponse res) Renders the basic (INFO-tier) portion of the debug record.BasicRestDebugFormatter.formatBody(RestRequest req, RestResponse res) default StringRestDebugFormatter.formatBody(RestRequest req, RestResponse res) Renders the body (FINEST-tier) portion of the debug record.BasicRestDebugFormatter.formatHeaders(RestRequest req, RestResponse res) default StringRestDebugFormatter.formatHeaders(RestRequest req, RestResponse res) Renders the headers (FINE-tier) portion of the debug record. -
Uses of RestResponse in org.apache.juneau.rest.server.management
Methods in org.apache.juneau.rest.server.management with parameters of type RestResponseModifier and TypeMethodDescriptionDumpsMixin.getHeapDump(RestRequest req, RestResponse res) [GET /heapdump] - HotSpot heap dump (hprof) stream.DumpsResource.getHeapDump(RestRequest req, RestResponse res) [GET /heapdump] - HotSpot heap dump (hprof) stream. -
Uses of RestResponse in org.apache.juneau.rest.server.ops
Methods in org.apache.juneau.rest.server.ops with parameters of type RestResponseModifier and TypeMethodDescriptionvoidEchoMixin.echo(RestRequest req, RestResponse res, String remainder) [* /echo/*] — emit an introspection echo of the inbound request.voidAdminMixin.getHeap(RestResponse res) [GET /admin/heap] — emit JVM heap and non-heap memory statistics.voidAdminResource.getHeap(RestResponse res) [GET /heap] — emit JVM heap and non-heap memory statistics.voidAdminServlet.getHeap(RestResponse res) [GET /heap] — emit JVM heap and non-heap memory statistics.voidAdminMixin.getRateLimit(RestRequest req, RestResponse res) [GET /admin/ratelimit] — emit registeredRateLimitGuardbean configuration.voidAdminResource.getRateLimit(RestRequest req, RestResponse res) [GET /ratelimit] — emit registeredRateLimitGuardbean configuration.voidAdminServlet.getRateLimit(RestRequest req, RestResponse res) [GET /ratelimit] — emit registeredRateLimitGuardbean configuration.voidAdminMixin.getThreads(RestResponse res) [GET /admin/threads] — emit a JSON list of currently-live threads.voidAdminResource.getThreads(RestResponse res) [GET /threads] — emit a JSON list of currently-live threads.voidAdminServlet.getThreads(RestResponse res) [GET /threads] — emit a JSON list of currently-live threads.voidAdminMixin.postCacheFlush(RestRequest req, RestResponse res) [POST /admin/cache/flush] — run all registered cache-flush hooks (or a subset).voidAdminResource.postCacheFlush(RestRequest req, RestResponse res) [POST /cache/flush] — run all registered cache-flush hooks (or a subset).voidAdminServlet.postCacheFlush(RestRequest req, RestResponse res) [POST /cache/flush] — run all registered cache-flush hooks (or a subset).voidAdminProvider.serveCacheFlush(RestRequest req, RestResponse res) Runs all registered cache-flush hooks (or a subset).voidAdminProvider.serveHeap(RestResponse res) Serves JVM heap and non-heap memory statistics.voidAdminProvider.serveRateLimit(RestRequest req, RestResponse res) Serves the registeredRateLimitGuardbean configuration.voidAdminProvider.serveThreads(RestResponse res) Serves the thread dump as a JSON list of currently-live threads. -
Uses of RestResponse in org.apache.juneau.rest.server.servlet
Methods in org.apache.juneau.rest.server.servlet that return RestResponseModifier and TypeMethodDescriptionRestResource.getResponse()Returns the current thread-local HTTP response.RestServlet.getResponse()Returns the current thread-local HTTP response. -
Uses of RestResponse in org.apache.juneau.rest.server.sse
Constructors in org.apache.juneau.rest.server.sse with parameters of type RestResponse -
Uses of RestResponse in org.apache.juneau.rest.server.view
Methods in org.apache.juneau.rest.server.view with parameters of type RestResponseModifier and TypeMethodDescriptionvoidRawTemplateDispatcher.render(String path, RestRequest req, RestResponse res) Renders the raw template identified by the trailing request path onto the response.voidViewResource.render(String path, RestRequest req, RestResponse res) [GET /*] — render the raw template identified by the trailing path under this child's subtree mount.voidViewServlet.render(String path, RestRequest req, RestResponse res) [GET /*] — render the raw template identified by the trailing path under this servlet's sibling top-level mount. -
Uses of RestResponse in org.apache.juneau.rest.server.view.freemarker
Methods in org.apache.juneau.rest.server.view.freemarker with parameters of type RestResponseModifier and TypeMethodDescriptionvoidFreemarkerDispatcher.render(String path, RestRequest req, RestResponse res) Renders a raw template through the FreeMarker engine onto the response.voidFreemarkerMixin.render(String path, RestRequest req, RestResponse res) [GET /freemarker/*] — render a raw template through the FreeMarker engine. -
Uses of RestResponse in org.apache.juneau.rest.server.view.jsp
Methods in org.apache.juneau.rest.server.view.jsp with parameters of type RestResponseModifier and TypeMethodDescriptionvoidJspDispatcher.render(String path, RestRequest req, RestResponse res) Forwards the request to the JSP engine for the raw.jspresource at the trailing path.voidJspMixin.render(String path, RestRequest req, RestResponse res) [GET /jsp/*] — forward the request to the JSP engine. -
Uses of RestResponse in org.apache.juneau.rest.server.view.mustache
Methods in org.apache.juneau.rest.server.view.mustache with parameters of type RestResponseModifier and TypeMethodDescriptionvoidMustacheDispatcher.render(String path, RestRequest req, RestResponse res) Renders a raw template through the Mustache engine onto the response.voidMustacheMixin.render(String path, RestRequest req, RestResponse res) [GET /mustache/*] — render a raw template through the Mustache engine. -
Uses of RestResponse in org.apache.juneau.rest.server.view.thymeleaf
Methods in org.apache.juneau.rest.server.view.thymeleaf with parameters of type RestResponseModifier and TypeMethodDescriptionvoidThymeleafDispatcher.render(String path, RestRequest req, RestResponse res) Renders a raw template through the Thymeleaf engine onto the response.voidThymeleafMixin.render(String path, RestRequest req, RestResponse res) [GET /thymeleaf/*] — render a raw template through the Thymeleaf engine. -
Uses of RestResponse in org.apache.juneau.rest.server.widget
Methods in org.apache.juneau.rest.server.widget with parameters of type RestResponseModifier and TypeMethodDescriptionMenuItemWidget.getAfterShowScript(RestRequest req, RestResponse res) Optional Javascript to execute immediately after a menu item is shown.MenuItemWidget.getBeforeShowScript(RestRequest req, RestResponse res) Optional Javascript to execute immediately before a menu item is shown.ContentTypeMenuItem.getContent(RestRequest req, RestResponse res) abstract ObjectMenuItemWidget.getContent(RestRequest req, RestResponse res) The content of the popup.QueryMenuItem.getContent(RestRequest req, RestResponse res) MenuItemWidget.getHtml(RestRequest req, RestResponse res) PoweredByApache.getHtml(RestRequest req, RestResponse res) Returns an Apache image tag hyperlinked to"http://apache.org" PoweredByJuneau.getHtml(RestRequest req, RestResponse res) Returns an Apache Juneau image tag hyperlinked to"http://juneau.apache.org" Widget.getHtml(RestRequest req, RestResponse res) Resolves the HTML content for this widget.ContentTypeMenuItem.getLabel(RestRequest req, RestResponse res) abstract StringMenuItemWidget.getLabel(RestRequest req, RestResponse res) The label for the menu item as it's rendered in the menu bar.QueryMenuItem.getLabel(RestRequest req, RestResponse res) MenuItemWidget.getScript(RestRequest req, RestResponse res) Returns the Javascript needed for the show and hide actions of the menu item.Widget.getScript(RestRequest req, RestResponse res) Resolves any Javascript that should be added to the<head>/<script> element.MenuItemWidget.getStyle(RestRequest req, RestResponse res) Defines a"menu-item" class that needs to be used on the outer element of the HTML returned by theMenuItemWidget.getHtml(RestRequest,RestResponse)method.QueryMenuItem.getStyle(RestRequest req, RestResponse res) Returns CSS for the tooltips.Widget.getStyle(RestRequest req, RestResponse res) Resolves any CSS styles that should be added to the<head>/<style> element.protected StringWidget.loadHtmlWithVars(RestRequest req, RestResponse res, String name) Same asWidget.loadHtml(RestRequest,String)but replaces request-time SVL variables.protected StringWidget.loadScriptWithVars(RestRequest req, RestResponse res, String name) Same asWidget.loadScript(RestRequest,String)but replaces request-time SVL variables.protected StringWidget.loadStyleWithVars(RestRequest req, RestResponse res, String name) Same asWidget.loadStyle(RestRequest,String)but replaces request-time SVL variables. -
Uses of RestResponse in org.apache.juneau.terminal.region
Methods in org.apache.juneau.terminal.region with parameters of type RestResponseModifier and TypeMethodDescriptionstatic voidTerminalEndpoints.bytes(Optional<TerminalSource> source, RestRequest req, RestResponse res) Serves?from=<offset>&max=<n>as raw bytes with theTerm-*headers.static voidTerminalEndpoints.raw(Optional<TerminalSource> source, String id, RestResponse res) Serves every byte still held as an attachment named<id>.log.default voidTerminalMixin.terminalBytes(String id, RestRequest req, RestResponse res) [GET /juneau-terminal/{id}/bytes] — raw bytes from an offset.default voidTerminalMixin.terminalRaw(String id, RestRequest req, RestResponse res) [GET /juneau-terminal/{id}/raw] — the whole log as an attachment.