-
- All Implemented Interfaces:
-
java.io.Serializable
,javax.servlet.Servlet
,javax.servlet.ServletConfig
public final class JavalinJettyServlet extends WebSocketServlet
The JavalinJettyServlet is responsible for both WebSocket and HTTP requests. It extends Jetty's WebSocketServlet, and has a JavalinServlet as a constructor arg. It switches between WebSocket and HTTP in the service method.
-
-
Field Summary
Fields Modifier and Type Field Description private final WsExceptionMapper
wsExceptionMapper
private final WsPathMatcher
wsPathMatcher
private final JavalinConfig
config
-
Constructor Summary
Constructors Constructor Description JavalinJettyServlet(JavalinConfig config, JavalinServlet httpServlet)
-
Method Summary
Modifier and Type Method Description final WsExceptionMapper
getWsExceptionMapper()
final WsPathMatcher
getWsPathMatcher()
final JavalinConfig
getConfig()
final Unit
addHandler(WsHandlerType handlerType, String path, Consumer<WsConfig> ws, Set<RouteRole> roles)
Unit
configure(WebSocketServletFactory factory)
-
Methods inherited from class org.eclipse.jetty.websocket.servlet.WebSocketServlet
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service
-
Methods inherited from class io.javalin.jetty.JavalinJettyServlet
destroy, init
-
Methods inherited from class javax.servlet.http.HttpServlet
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
JavalinJettyServlet
JavalinJettyServlet(JavalinConfig config, JavalinServlet httpServlet)
-
-
Method Detail
-
getWsExceptionMapper
final WsExceptionMapper getWsExceptionMapper()
-
getWsPathMatcher
final WsPathMatcher getWsPathMatcher()
-
getConfig
final JavalinConfig getConfig()
-
addHandler
final Unit addHandler(WsHandlerType handlerType, String path, Consumer<WsConfig> ws, Set<RouteRole> roles)
-
-
-
-