Package org.jobrunr.dashboard.server.sse
Class ServerSentEventHandler
- java.lang.Object
-
- org.jobrunr.dashboard.server.AbstractHttpExchangeHandler
-
- org.jobrunr.dashboard.server.sse.ServerSentEventHandler
-
- All Implemented Interfaces:
com.sun.net.httpserver.HttpHandler
,java.lang.AutoCloseable
,HttpExchangeHandler
- Direct Known Subclasses:
JobRunrSseHandler
public abstract class ServerSentEventHandler extends AbstractHttpExchangeHandler
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ServerSentEventHandler()
protected
ServerSentEventHandler(java.lang.String contextPath)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
close()
protected abstract SseExchange
createSseExchange(com.sun.net.httpserver.HttpExchange httpExchange)
java.lang.String
getContextPath()
void
handle(com.sun.net.httpserver.HttpExchange httpExchange)
-
-
-
Method Detail
-
getContextPath
public java.lang.String getContextPath()
-
handle
public void handle(com.sun.net.httpserver.HttpExchange httpExchange) throws java.io.IOException
- Throws:
java.io.IOException
-
createSseExchange
protected abstract SseExchange createSseExchange(com.sun.net.httpserver.HttpExchange httpExchange) throws java.io.IOException
- Throws:
java.io.IOException
-
close
public void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfaceHttpExchangeHandler
- Overrides:
close
in classAbstractHttpExchangeHandler
-
-