public static class HTTPServer.MethodContextHandler extends Object implements HTTPServer.ContextHandler
MethodContextHandler services a context
by invoking a handler method on a specified object.
The method must have the same signature and contract as
HTTPServer.ContextHandler.serve(org.noear.solon.boot.jlhttp.HTTPServer.Request, org.noear.solon.boot.jlhttp.HTTPServer.Response), but can have an arbitrary name.
| 构造器和说明 |
|---|
MethodContextHandler(Method m,
Object obj) |
public MethodContextHandler(Method m, Object obj) throws IllegalArgumentException
public int serve(HTTPServer.Request req, HTTPServer.Response resp) throws IOException
HTTPServer.ContextHandlerserve 在接口中 HTTPServer.ContextHandlerreq - the request to be servedresp - the response to be filledIOException - if an IO error occursCopyright © 2021. All rights reserved.