Checks if the input can be handled by this class. If it cannot handle the input, rejects with an error explaining why.
Input that could potentially be handled.
A promise resolving if the input can be handled, rejecting with an Error if not.
Creates a JSON object representing the result of executing the given operation, together with the template it should be applied to.
Handles the given input. This may only be called if canHandle did not reject. When unconditionally calling both in sequence, consider handleSafe instead.
A promise resolving when handling is finished.
Input data that will be handled if it can be handled.
A promise resolving if the input can be handled, rejecting with an Error if not.
Handles the initial setup of a server. Will capture all requests until setup is finished, this to prevent accidentally running unsafe servers.
GET requests will return the view template which should contain the setup information for the user. POST requests will run an initializer and/or perform a registration step, both optional. After successfully completing a POST request this handler will disable itself and become unreachable. All other methods will be rejected.