类 UserAttributeHandshakeInterceptor

java.lang.Object
com.sie.mbm.mom.framework.websocket.custom.UserAttributeHandshakeInterceptor
所有已实现的接口:
org.springframework.web.socket.server.HandshakeInterceptor

@Order(-2147483647) public class UserAttributeHandshakeInterceptor extends Object implements org.springframework.web.socket.server.HandshakeInterceptor
  • 构造器概要

    构造器
    构造器
    说明
     
  • 方法概要

    修饰符和类型
    方法
    说明
    void
    afterHandshake(org.springframework.http.server.ServerHttpRequest request, org.springframework.http.server.ServerHttpResponse response, org.springframework.web.socket.WebSocketHandler wsHandler, Exception exception)
    Invoked after the handshake is done.
    boolean
    beforeHandshake(org.springframework.http.server.ServerHttpRequest request, org.springframework.http.server.ServerHttpResponse response, org.springframework.web.socket.WebSocketHandler wsHandler, Map<String,Object> attributes)
    Invoked before the handshake is processed.

    从类继承的方法 java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 构造器详细资料

    • UserAttributeHandshakeInterceptor

      public UserAttributeHandshakeInterceptor()
  • 方法详细资料

    • 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)
      Invoked before the handshake is processed.
      指定者:
      beforeHandshake 在接口中 org.springframework.web.socket.server.HandshakeInterceptor
      参数:
      request - the current request
      response - the current response
      wsHandler - the target WebSocket handler
      attributes - the attributes from the HTTP handshake to associate with the WebSocket session; the provided attributes are copied, the original map is not used.
      返回:
      whether to proceed with the handshake (true) or abort (false)
    • afterHandshake

      public void afterHandshake(org.springframework.http.server.ServerHttpRequest request, org.springframework.http.server.ServerHttpResponse response, org.springframework.web.socket.WebSocketHandler wsHandler, Exception exception)
      Invoked after the handshake is done. The response status and headers indicate the results of the handshake, i.e. whether it was successful or not.
      指定者:
      afterHandshake 在接口中 org.springframework.web.socket.server.HandshakeInterceptor
      参数:
      request - the current request
      response - the current response
      wsHandler - the target WebSocket handler
      exception - an exception raised during the handshake, or null if none