Interface WebSocketAdapter

All Known Implementing Classes:
EventWebSocketAdapter, LogWebSocketAdapter

@NonNullByDefault public interface WebSocketAdapter
The WebSocketAdapter can be implemented to register an adapter for a websocket connection. It will be accessible on the path /ws/ADAPTER_ID of your server. Security is handled by the CommonWebSocketServlet.
Author:
Miguel Álvarez Díez - Initial contribution
  • Method Summary

    Modifier and Type
    Method
    Description
    createWebSocket(org.eclipse.jetty.websocket.servlet.ServletUpgradeRequest servletUpgradeRequest, org.eclipse.jetty.websocket.servlet.ServletUpgradeResponse servletUpgradeResponse)
    Creates a websocket instance.
    The adapter id.
  • Method Details

    • getId

      String getId()
      The adapter id. In combination with the base path CommonWebSocketServlet.SERVLET_PATH defines the adapter path.
      Returns:
      the adapter id.
    • createWebSocket

      Object createWebSocket(org.eclipse.jetty.websocket.servlet.ServletUpgradeRequest servletUpgradeRequest, org.eclipse.jetty.websocket.servlet.ServletUpgradeResponse servletUpgradeResponse)
      Creates a websocket instance. It should use the org.eclipse.jetty.websocket.api.annotations or implement WebSocketListener.
      Returns:
      a websocket instance.