Class SessionEnricherHandshakeInterceptor
- java.lang.Object
-
- com.consol.citrus.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 Summary
Constructors Constructor Description SessionEnricherHandshakeInterceptor(String wsId, String wsPath)Default constructor initializing fields.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterHandshake(org.springframework.http.server.ServerHttpRequest request, org.springframework.http.server.ServerHttpResponse response, org.springframework.web.socket.WebSocketHandler wsHandler, Exception exception)booleanbeforeHandshake(org.springframework.http.server.ServerHttpRequest request, org.springframework.http.server.ServerHttpResponse response, org.springframework.web.socket.WebSocketHandler wsHandler, Map<String,Object> attributes)
-
-
-
Method Detail
-
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:
beforeHandshakein interfaceorg.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:
afterHandshakein interfaceorg.springframework.web.socket.server.HandshakeInterceptor
-
-