List of usage examples for org.springframework.web.socket.server HandshakeInterceptor beforeHandshake
boolean beforeHandshake(ServerHttpRequest request, ServerHttpResponse response, WebSocketHandler wsHandler, Map<String, Object> attributes) throws Exception;
From source file:org.springframework.web.socket.server.support.HandshakeInterceptorChain.java
public boolean applyBeforeHandshake(ServerHttpRequest request, ServerHttpResponse response, Map<String, Object> attributes) throws Exception { for (int i = 0; i < this.interceptors.size(); i++) { HandshakeInterceptor interceptor = this.interceptors.get(i); if (!interceptor.beforeHandshake(request, response, this.wsHandler, attributes)) { if (logger.isDebugEnabled()) { logger.debug(interceptor + " returns false from beforeHandshake - precluding handshake"); }/*from www . ja v a 2 s . c o m*/ applyAfterHandshake(request, response, null); return false; } this.interceptorIndex = i; } return true; }