diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/handler/ConcurrentWebSocketSessionDecorator.java b/spring-websocket/src/main/java/org/springframework/web/socket/handler/ConcurrentWebSocketSessionDecorator.java index c5fe7f8526..bcc478ca47 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/handler/ConcurrentWebSocketSessionDecorator.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/handler/ConcurrentWebSocketSessionDecorator.java @@ -275,6 +275,13 @@ public class ConcurrentWebSocketSessionDecorator extends WebSocketSessionDecorat } } + /** + * Return the configured overflow strategy. + * @since 6.3 + */ + public OverflowStrategy getOverflowStrategy() { + return this.overflowStrategy; + } @Override public String toString() { diff --git a/spring-websocket/src/test/java/org/springframework/web/socket/handler/ConcurrentWebSocketSessionDecoratorTests.java b/spring-websocket/src/test/java/org/springframework/web/socket/handler/ConcurrentWebSocketSessionDecoratorTests.java index 8f8b595e81..da08400d94 100644 --- a/spring-websocket/src/test/java/org/springframework/web/socket/handler/ConcurrentWebSocketSessionDecoratorTests.java +++ b/spring-websocket/src/test/java/org/springframework/web/socket/handler/ConcurrentWebSocketSessionDecoratorTests.java @@ -215,4 +215,14 @@ class ConcurrentWebSocketSessionDecoratorTests { assertThat(latch.await(5, TimeUnit.SECONDS)).isTrue(); } + @Test + void configuredProperties() { + TestWebSocketSession session = new TestWebSocketSession(); + ConcurrentWebSocketSessionDecorator sessionDecorator = new ConcurrentWebSocketSessionDecorator(session, 42, 43, OverflowStrategy.DROP); + + assertThat(sessionDecorator.getSendTimeLimit()).isEqualTo(42); + assertThat(sessionDecorator.getBufferSizeLimit()).isEqualTo(43); + assertThat(sessionDecorator.getOverflowStrategy()).isEqualTo(OverflowStrategy.DROP); + } + }