[lgwebos] Create WEB socket client using OH core method (#14382)
Follow-up PR #14331 Signed-off-by: Laurent Garnier <lg.hc@free.fr>
This commit is contained in:
parent
b2a4ee42c9
commit
0e246aa313
|
@ -16,7 +16,6 @@ import static org.openhab.binding.lgwebos.internal.LGWebOSBindingConstants.*;
|
||||||
|
|
||||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||||
import org.eclipse.jdt.annotation.Nullable;
|
import org.eclipse.jdt.annotation.Nullable;
|
||||||
import org.eclipse.jetty.client.HttpClient;
|
|
||||||
import org.eclipse.jetty.util.ssl.SslContextFactory;
|
import org.eclipse.jetty.util.ssl.SslContextFactory;
|
||||||
import org.eclipse.jetty.websocket.client.WebSocketClient;
|
import org.eclipse.jetty.websocket.client.WebSocketClient;
|
||||||
import org.openhab.binding.lgwebos.internal.handler.LGWebOSHandler;
|
import org.openhab.binding.lgwebos.internal.handler.LGWebOSHandler;
|
||||||
|
@ -55,8 +54,7 @@ public class LGWebOSHandlerFactory extends BaseThingHandlerFactory {
|
||||||
* Cannot use openHAB's shared web socket client (webSocketFactory.getCommonWebSocketClient()) as we have to
|
* Cannot use openHAB's shared web socket client (webSocketFactory.getCommonWebSocketClient()) as we have to
|
||||||
* change client settings.
|
* change client settings.
|
||||||
*/
|
*/
|
||||||
var httpClient = new HttpClient(new SslContextFactory.Client(true));
|
this.webSocketClient = webSocketFactory.createWebSocketClient(BINDING_ID, new SslContextFactory.Client(true));
|
||||||
this.webSocketClient = new WebSocketClient(httpClient);
|
|
||||||
this.stateDescriptionProvider = stateDescriptionProvider;
|
this.stateDescriptionProvider = stateDescriptionProvider;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue