Package com.jsgalactic.axiom.context
Interface Middleware.Next
- Enclosing interface:
Middleware
public static interface Middleware.Next
The rest of a middleware chain for one request. Valid only during the middleware call that
received it, on the request's thread.
-
Method Summary
-
Method Details
-
run
Runs the remaining middleware and the handler. The handler's result is returned as aResponsemapped as for handlers (text, bytes,nullas 204, the context status); values for a codec, such asctx.json(value), are still unencoded: encoding and the Accept check run once after the whole chain.- Returns:
- the response of the rest of the chain
- Throws:
Exception- whatever the rest of the chain throwsIllegalStateException- if called a second time, after the middleware returned, or from a thread other than the request's
-