Interface TerminalMixin

All Known Implementing Classes:
JobsRest

public interface TerminalMixin
Mixin interface that serves the terminal bytes and raw endpoints, plus this module's own JS and CSS.

The one abstract method is the application's resolver, which is where authorization lives: an unknown id and a forbidden id both answer 404. Ids match ^[A-Za-z0-9_-]{1,128}$; anything else answers 400 before the resolver runs. The mixin adds no auth of its own; the host resource's guards apply.

Step events are not served here: pair the terminal with TerminalViewMixin over the same id.

Example:

@Rest public class RunsResource extends BasicRestServlet implements TerminalMixin, TerminalViewMixin { @Override public Optional<TerminalSource> terminalSource(String id, RestRequest req) { return runs.find(id).map(Run::terminal); } }