Class RestHttpHandler
- java.lang.Object
-
- cn.boboweike.carrot.dashboard.server.AbstractHttpExchangeHandler
-
- cn.boboweike.carrot.dashboard.server.http.RestHttpHandler
-
- All Implemented Interfaces:
HttpExchangeHandler,HttpHandler,AutoCloseable
- Direct Known Subclasses:
CarrotApiHandler
public class RestHttpHandler extends AbstractHttpExchangeHandler
-
-
Constructor Summary
Constructors Constructor Description RestHttpHandler(String contextPath, JsonMapper jsonMapper)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddelete(String url, HttpRequestHandler httpRequestHandler)voidget(String url, HttpRequestHandler httpRequestHandler)StringgetContextPath()voidhandle(HttpExchange httpExchange)voidhead(String url, HttpRequestHandler httpRequestHandler)voidpost(String url, HttpRequestHandler httpRequestHandler)voidput(String url, HttpRequestHandler httpRequestHandler)<T extends Exception>
voidwithExceptionMapping(Class<T> clazz, ExceptionHandler exceptionHandler)-
Methods inherited from class cn.boboweike.carrot.dashboard.server.AbstractHttpExchangeHandler
close
-
-
-
-
Constructor Detail
-
RestHttpHandler
public RestHttpHandler(String contextPath, JsonMapper jsonMapper)
-
-
Method Detail
-
getContextPath
public String getContextPath()
-
get
public void get(String url, HttpRequestHandler httpRequestHandler)
-
put
public void put(String url, HttpRequestHandler httpRequestHandler)
-
post
public void post(String url, HttpRequestHandler httpRequestHandler)
-
delete
public void delete(String url, HttpRequestHandler httpRequestHandler)
-
head
public void head(String url, HttpRequestHandler httpRequestHandler)
-
withExceptionMapping
public <T extends Exception> void withExceptionMapping(Class<T> clazz, ExceptionHandler exceptionHandler)
-
handle
public void handle(HttpExchange httpExchange)
-
-