Package org.apache.juneau.console.views
Interface TerminalViewMixin
public interface TerminalViewMixin
Mixin interface that serves the terminal-view events endpoint.
The one abstract method is the application's resolver, which is where authorization lives: an unknown id and a
forbidden id both answer 404, so ids cannot be enumerated. Run ids are opaque URL tokens matching
^[A-Za-z0-9_-]{1,128}$; anything else answers 400 before the resolver runs.
Example:
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondefault voidterminalViewEvents(String runId, RestRequest req, RestResponse res) [GET /juneau-terminal-view/{runId}/events] — one page of events as JSON.terminalViewSource(String runId, RestRequest req) Resolves the source for a run id, applying the application's own access rules.
-
Field Details
-
RUN_VIEW_PREFIX
The URL path prefix for the terminal-view endpoint (relative to the host mount).- See Also:
-
EVENTS_PATH
The URL path template of the events endpoint.- See Also:
-
-
Method Details
-
terminalViewSource
Resolves the source for a run id, applying the application's own access rules.- Parameters:
runId- The run id from the URL path (already checked against the grammar).req- The in-flight request.- Returns:
- The source, or empty when the id is unknown or the caller may not read it.
-
terminalViewEvents
default void terminalViewEvents(@Path("runId") String runId, RestRequest req, RestResponse res) throws IOException [GET /juneau-terminal-view/{runId}/events] — one page of events as JSON.- Parameters:
runId- The run id.req- The request.res- The response.- Throws:
IOException- If the response could not be written.
-