Class ServerSentEventHandler
- java.lang.Object
-
- cn.boboweike.carrot.dashboard.server.AbstractHttpExchangeHandler
-
- cn.boboweike.carrot.dashboard.server.sse.ServerSentEventHandler
-
- All Implemented Interfaces:
HttpExchangeHandler,HttpHandler,AutoCloseable
- Direct Known Subclasses:
CarrotSseHandler
public abstract class ServerSentEventHandler extends AbstractHttpExchangeHandler
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedServerSentEventHandler()protectedServerSentEventHandler(String contextPath)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidclose()protected abstract SseExchangecreateSseExchange(HttpExchange httpExchange)StringgetContextPath()voidhandle(HttpExchange httpExchange)
-
-
-
Constructor Detail
-
ServerSentEventHandler
protected ServerSentEventHandler()
-
ServerSentEventHandler
protected ServerSentEventHandler(String contextPath)
-
-
Method Detail
-
getContextPath
public String getContextPath()
-
handle
public void handle(HttpExchange httpExchange) throws IOException
- Throws:
IOException
-
createSseExchange
protected abstract SseExchange createSseExchange(HttpExchange httpExchange) throws IOException
- Throws:
IOException
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceHttpExchangeHandler- Overrides:
closein classAbstractHttpExchangeHandler
-
-