From: Robert Varga Date: Wed, 12 Jan 2022 14:48:09 +0000 (+0100) Subject: Expose WebSocketSessionHandler X-Git-Tag: v2.0.12~11 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=commitdiff_plain;h=232b26aa678abe1988c3175ef0bafec7b20c7c1f;p=netconf.git Expose WebSocketSessionHandler Jetty is mucking around with reflection, publish the handler class so it can access its methods. JIRA: NETCONF-844 Change-Id: I502cdf439f52b45e69e3261199ec13436eac9f95 Signed-off-by: Robert Varga --- diff --git a/restconf/restconf-nb-rfc8040/src/main/java/org/opendaylight/restconf/nb/rfc8040/streams/WebSocketSessionHandler.java b/restconf/restconf-nb-rfc8040/src/main/java/org/opendaylight/restconf/nb/rfc8040/streams/WebSocketSessionHandler.java index 38d6922ef4..0354278531 100644 --- a/restconf/restconf-nb-rfc8040/src/main/java/org/opendaylight/restconf/nb/rfc8040/streams/WebSocketSessionHandler.java +++ b/restconf/restconf-nb-rfc8040/src/main/java/org/opendaylight/restconf/nb/rfc8040/streams/WebSocketSessionHandler.java @@ -34,7 +34,7 @@ import org.slf4j.LoggerFactory; * to data-change-event or notification listener, and sending of data over established web-socket session. */ @WebSocket -final class WebSocketSessionHandler implements StreamSessionHandler { +public final class WebSocketSessionHandler implements StreamSessionHandler { private static final Logger LOG = LoggerFactory.getLogger(WebSocketSessionHandler.class); private static final byte[] PING_PAYLOAD = "ping".getBytes(Charset.defaultCharset()); @@ -81,7 +81,7 @@ final class WebSocketSessionHandler implements StreamSessionHandler { @OnWebSocketConnect public synchronized void onWebSocketConnected(final Session webSocketSession) { if (session == null || !session.isOpen()) { - this.session = webSocketSession; + session = webSocketSession; listener.addSubscriber(this); LOG.debug("A new web-socket session {} has been successfully registered.", webSocketSession); if (heartbeatInterval != 0) {