Package org.springframework.web.socket.server

Examples of org.springframework.web.socket.server.HandshakeInterceptor


  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;
View Full Code Here


  }


  public void applyAfterHandshake(ServerHttpRequest request, ServerHttpResponse response, Exception failure) {
    for (int i = this.interceptorIndex; i >= 0; i--) {
      HandshakeInterceptor interceptor = this.interceptors.get(i);
      try {
        interceptor.afterHandshake(request, response, this.wsHandler, failure);
      }
      catch (Throwable ex) {
        if (logger.isWarnEnabled()) {
          logger.warn(interceptor + " threw exception in afterHandshake: " + ex);
        }
View Full Code Here

TOP

Related Classes of org.springframework.web.socket.server.HandshakeInterceptor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.