Class LogWebSocketAdapter
java.lang.Object
org.openhab.core.io.websocket.log.LogWebSocketAdapter
- All Implemented Interfaces:
WebSocketAdapter
The
LogWebSocketAdapter
allows subscription to log events over WebSocket- Author:
- Jan N. Klug - Initial contribution
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateWebSocket
(org.eclipse.jetty.websocket.servlet.ServletUpgradeRequest servletUpgradeRequest, org.eclipse.jetty.websocket.servlet.ServletUpgradeResponse servletUpgradeResponse) Creates a websocket instance.void
getId()
The adapter id.void
registerListener
(LogWebSocket eventWebSocket) void
unregisterListener
(LogWebSocket eventWebSocket)
-
Field Details
-
ADAPTER_ID
- See Also:
-
-
Constructor Details
-
LogWebSocketAdapter
public LogWebSocketAdapter(org.osgi.service.log.LogReaderService logReaderService)
-
-
Method Details
-
deactivate
public void deactivate() -
registerListener
-
unregisterListener
-
getId
Description copied from interface:WebSocketAdapter
The adapter id. In combination with the base pathCommonWebSocketServlet.SERVLET_PATH
defines the adapter path.- Specified by:
getId
in interfaceWebSocketAdapter
- 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 theorg.eclipse.jetty.websocket.api.annotations
or implementWebSocketListener
.- Specified by:
createWebSocket
in interfaceWebSocketAdapter
- Returns:
- a websocket instance.
-