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"); } applyAfterHandshake(request, response, null); return false; } this.interceptorIndex = i; } return true; }
chain.applyAfterHandshake(request, response, null); response.close(); chain.applyAfterHandshake(request, response, failure); throw failure;
chain.applyAfterHandshake(request, response, null); chain.applyAfterHandshake(request, response, failure); throw failure;
@Test public void applyAfterHandshakeOnly() { HandshakeInterceptorChain chain = new HandshakeInterceptorChain(interceptors, wsHandler); chain.applyAfterHandshake(request, response, null); verifyNoMoreInteractions(i1, i2, i3); }
chain.applyAfterHandshake(request, response, null); chain.applyAfterHandshake(request, response, failure); throw failure;
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"); } applyAfterHandshake(request, response, null); return false; } this.interceptorIndex = i; } return true; }
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"); } applyAfterHandshake(request, response, null); return false; } this.interceptorIndex = i; } return true; }
chain.applyAfterHandshake(request, response, null); chain.applyAfterHandshake(request, response, failure); throw failure;
chain.applyAfterHandshake(request, response, null); chain.applyAfterHandshake(request, response, failure); throw failure;
chain.applyAfterHandshake(request, response, null); response.close(); chain.applyAfterHandshake(request, response, failure); throw failure;
chain.applyAfterHandshake(request, response, null); response.close(); chain.applyAfterHandshake(request, response, failure); throw failure;
chain.applyAfterHandshake(request, response, null); chain.applyAfterHandshake(request, response, failure); throw failure;
chain.applyAfterHandshake(request, response, null); chain.applyAfterHandshake(request, response, failure); throw failure;