Class WebSocketConnectHandlerDecoratorFactory

java.lang.Object
org.springframework.session.web.socket.handler.WebSocketConnectHandlerDecoratorFactory
All Implemented Interfaces:
org.springframework.web.socket.handler.WebSocketHandlerDecoratorFactory

public final class WebSocketConnectHandlerDecoratorFactory extends Object implements org.springframework.web.socket.handler.WebSocketHandlerDecoratorFactory
Ensures that a SessionConnectEvent is published in WebSocketHandler.afterConnectionEstablished(WebSocketSession). This is necessary so that the WebSocketSession can be mapped to the corresponding Spring Session to terminate any WebSocketSession associated with a Spring Session that was destroyed.
Since:
1.0
See Also:
  • Constructor Details

    • WebSocketConnectHandlerDecoratorFactory

      public WebSocketConnectHandlerDecoratorFactory(org.springframework.context.ApplicationEventPublisher eventPublisher)
      Creates a new instance.
      Parameters:
      eventPublisher - the ApplicationEventPublisher to use. Cannot be null.
  • Method Details

    • decorate

      public org.springframework.web.socket.WebSocketHandler decorate(org.springframework.web.socket.WebSocketHandler handler)
      Specified by:
      decorate in interface org.springframework.web.socket.handler.WebSocketHandlerDecoratorFactory