Class SessionEnricherHandshakeInterceptor

java.lang.Object
org.citrusframework.websocket.interceptor.SessionEnricherHandshakeInterceptor
All Implemented Interfaces:
org.springframework.web.socket.server.HandshakeInterceptor

public class SessionEnricherHandshakeInterceptor extends Object implements org.springframework.web.socket.server.HandshakeInterceptor
Enriches the Web Socket session with the Web Socket ID and PATH as defined in the http-server citrus context.
Since:
2.3
Author:
Martin Maher
  • Constructor Details

    • SessionEnricherHandshakeInterceptor

      public SessionEnricherHandshakeInterceptor(String wsId, String wsPath)
      Default constructor initializing fields.
      Parameters:
      wsId -
      wsPath -
  • Method Details

    • beforeHandshake

      public boolean beforeHandshake(org.springframework.http.server.ServerHttpRequest request, org.springframework.http.server.ServerHttpResponse response, org.springframework.web.socket.WebSocketHandler wsHandler, Map<String,Object> attributes) throws Exception
      Specified by:
      beforeHandshake in interface org.springframework.web.socket.server.HandshakeInterceptor
      Throws:
      Exception
    • afterHandshake

      public void afterHandshake(org.springframework.http.server.ServerHttpRequest request, org.springframework.http.server.ServerHttpResponse response, org.springframework.web.socket.WebSocketHandler wsHandler, Exception exception)
      Specified by:
      afterHandshake in interface org.springframework.web.socket.server.HandshakeInterceptor