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 Summary
ConstructorsConstructorDescriptionSessionEnricherHandshakeInterceptor(String wsId, String wsPath) Default constructor initializing fields. -
Method Summary
Modifier and TypeMethodDescriptionvoidafterHandshake(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)
-
Constructor Details
-
SessionEnricherHandshakeInterceptor
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:
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
-