Class LogWebSocketAdapter

java.lang.Object
org.openhab.core.io.websocket.log.LogWebSocketAdapter
All Implemented Interfaces:
WebSocketAdapter

@NonNullByDefault public class LogWebSocketAdapter extends Object implements WebSocketAdapter
The LogWebSocketAdapter allows subscription to log events over WebSocket
Author:
Jan N. Klug - Initial contribution
  • Field Details

  • Constructor Details

    • LogWebSocketAdapter

      public LogWebSocketAdapter(org.osgi.service.log.LogReaderService logReaderService)
  • Method Details

    • deactivate

      public void deactivate()
    • registerListener

      public void registerListener(LogWebSocket eventWebSocket)
    • unregisterListener

      public void unregisterListener(LogWebSocket eventWebSocket)
    • getId

      public String getId()
      Description copied from interface: WebSocketAdapter
      The adapter id. In combination with the base path CommonWebSocketServlet.SERVLET_PATH defines the adapter path.
      Specified by:
      getId in interface WebSocketAdapter
      Returns:
      the adapter id.
    • createWebSocket

      public Object createWebSocket(org.eclipse.jetty.websocket.servlet.ServletUpgradeRequest servletUpgradeRequest, org.eclipse.jetty.websocket.servlet.ServletUpgradeResponse servletUpgradeResponse)
      Description copied from interface: WebSocketAdapter
      Creates a websocket instance. It should use the org.eclipse.jetty.websocket.api.annotations or implement WebSocketListener.
      Specified by:
      createWebSocket in interface WebSocketAdapter
      Returns:
      a websocket instance.