public class MvcHandler extends Object implements Route.MethodHandler
Constructor and Description |
---|
MvcHandler(Method handler,
Class<?> implementingClass,
RequestParamProvider provider)
Constructor for MvcHandler.
|
Modifier and Type | Method and Description |
---|---|
void |
handle(Request req,
Response rsp)
Callback method for a HTTP request.
|
void |
handle(Request req,
Response rsp,
Route.Chain chain)
The
handle method of the Filter is called by the server each time a
request/response pair is passed through the chain due to a client request for a resource at
the end of the chain. |
Class<?> |
implementingClass()
Target class.
|
Object |
invoke(Request req,
Response rsp,
Route.Chain chain) |
Method |
method()
Target method.
|
public MvcHandler(Method handler, Class<?> implementingClass, RequestParamProvider provider)
handler
- the method to handle the requestimplementingClass
- Target class (method owner).provider
- the request parameter providerpublic Method method()
Route.MethodHandler
method
in interface Route.MethodHandler
public Class<?> implementingClass()
Route.MethodHandler
implementingClass
in interface Route.MethodHandler
public void handle(Request req, Response rsp, Route.Chain chain) throws Throwable
Route.Filter
handle
method of the Filter is called by the server each time a
request/response pair is passed through the chain due to a client request for a resource at
the end of the chain.
The Route.Chain
passed in to this method allows the Filter to pass on the request and
response to the next entity in the chain.
A typical implementation of this method would follow the following pattern:
Route.Chain
object (chain.next(req, rsp)
),handle
in interface Route.Filter
handle
in interface Route.Handler
req
- A HTTP request.rsp
- A HTTP response.chain
- A route chain.Throwable
- If something goes wrong.public void handle(Request req, Response rsp) throws Throwable
Route.Handler
handle
in interface Route.Handler
req
- A HTTP request.rsp
- A HTTP response.Throwable
- If something goes wrong. The exception will processed by Jooby.public Object invoke(Request req, Response rsp, Route.Chain chain)
Copyright © 2017. All rights reserved.