类 WebSocketPrincipal

java.lang.Object
cn.herodotus.engine.message.websocket.domain.WebSocketPrincipal
所有已实现的接口:
Principal

public class WebSocketPrincipal extends Object implements Principal

Description: Websocket登录连接对象

用于保存websocket连接过程中需要存储的业务参数

作者:
: gengwei.zheng
Date:
: 2021/10/24 18:43
  • 构造器详细资料

    • WebSocketPrincipal

      public WebSocketPrincipal(cn.herodotus.engine.assistant.definition.domain.oauth2.PrincipalDetails details)
    • WebSocketPrincipal

      public WebSocketPrincipal(String userId)
  • 方法详细资料

    • getUsername

      public String getUsername()
    • setUsername

      public void setUsername(String username)
    • getName

      public String getName()
      这里的 Name 是发送信息目标的标识。

      使用 Username 可控度不高,使用也不方便。直接用ID

      指定者:
      getName 在接口中 Principal
      返回:
      WebSocket 用户的唯一标识
    • getUserId

      public String getUserId()
    • setUserId

      public void setUserId(String userId)
    • getEmployeeId

      public String getEmployeeId()
    • setEmployeeId

      public void setEmployeeId(String employeeId)
    • getAvatar

      public String getAvatar()
    • setAvatar

      public void setAvatar(String avatar)
    • getRoles

      public Set<String> getRoles()
    • setRoles

      public void setRoles(Set<String> roles)
    • equals

      public boolean equals(Object o)
      指定者:
      equals 在接口中 Principal
      覆盖:
      equals 在类中 Object
    • hashCode

      public int hashCode()
      指定者:
      hashCode 在接口中 Principal
      覆盖:
      hashCode 在类中 Object
    • toString

      public String toString()
      指定者:
      toString 在接口中 Principal
      覆盖:
      toString 在类中 Object