Package tech.muyan.api.websocket
Class MuyanWebSocketComponent
- java.lang.Object
-
- tech.muyan.api.websocket.MuyanWebSocketComponent
-
- All Implemented Interfaces:
MuyanPlatformComponent
public abstract class MuyanWebSocketComponent extends java.lang.Object implements MuyanPlatformComponent
-
-
Constructor Summary
Constructors Constructor Description MuyanWebSocketComponent()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidbroadcast(java.lang.Object payload)abstract java.lang.StringgetTopic()voidoffLoad()Invoked when the Muyan Low Code Development Platform unloads the plugin containing this component.voidonClose(java.lang.String sessionId)voidonLoad()Invoked when the Muyan Low Code Development Platform loads the plugin containing this component.abstract voidonMessage(java.lang.String sessionId, java.lang.String msgId, java.lang.Object payload)protected booleanpushMessage(java.lang.String sessionId, java.lang.String msgId, java.lang.Object payload)
-
-
-
Method Detail
-
onLoad
public void onLoad()
Description copied from interface:MuyanPlatformComponentInvoked when the Muyan Low Code Development Platform loads the plugin containing this component.This method is called automatically by the platform when the plugin is loaded. Implementations can override this method to perform any necessary initialization or setup tasks.
- Specified by:
onLoadin interfaceMuyanPlatformComponent
-
offLoad
public void offLoad()
Description copied from interface:MuyanPlatformComponentInvoked when the Muyan Low Code Development Platform unloads the plugin containing this component.This method is called automatically by the platform when the plugin is unloaded. Implementations can override this method to perform any necessary cleanup or teardown tasks.
- Specified by:
offLoadin interfaceMuyanPlatformComponent
-
broadcast
protected final void broadcast(java.lang.Object payload)
-
pushMessage
protected final boolean pushMessage(java.lang.String sessionId, java.lang.String msgId, java.lang.Object payload)
-
getTopic
public abstract java.lang.String getTopic()
-
onMessage
public abstract void onMessage(java.lang.String sessionId, java.lang.String msgId, java.lang.Object payload)
-
onClose
public void onClose(java.lang.String sessionId)
-
-