Class WebSocketPrincipal
java.lang.Object
cn.herodotus.engine.message.websocket.domain.WebSocketPrincipal
- All Implemented Interfaces:
Principal
Description: Websocket登录连接对象
用于保存websocket连接过程中需要存储的业务参数
- Author:
- : gengwei.zheng
- Date:
- : 2021/10/24 18:43
-
Constructor Summary
ConstructorsConstructorDescriptionWebSocketPrincipal(cn.herodotus.engine.assistant.definition.domain.oauth2.PrincipalDetails details) WebSocketPrincipal(String userId) -
Method Summary
Modifier and TypeMethodDescriptionbooleangetName()这里的 Name 是发送信息目标的标识。getRoles()inthashCode()voidvoidsetEmployeeId(String employeeId) voidvoidvoidsetUsername(String username) toString()
-
Constructor Details
-
WebSocketPrincipal
public WebSocketPrincipal(cn.herodotus.engine.assistant.definition.domain.oauth2.PrincipalDetails details) -
WebSocketPrincipal
-
-
Method Details
-
getUsername
-
setUsername
-
getName
这里的 Name 是发送信息目标的标识。使用 Username 可控度不高,使用也不方便。直接用ID
-
getUserId
-
setUserId
-
getEmployeeId
-
setEmployeeId
-
getAvatar
-
setAvatar
-
getRoles
-
setRoles
-
equals
-
hashCode
public int hashCode() -
toString
-