All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.healthy.common.websocket.handler.JsonMessageHandler Maven / Gradle / Ivy

There is a newer version: 2.0.0-M1
Show newest version
package com.healthy.common.websocket.handler;

import com.healthy.common.websocket.message.JsonWebSocketMessage;
import org.springframework.web.socket.WebSocketSession;

/**
 * JsonMessageHandler
 *
 * @author xm.z
 */
public interface JsonMessageHandler {

	/**
	 * JsonWebSocketMessage 类型消息处理
	 * @param session 当前接收 session
	 * @param message 当前接收到的 message
	 */
	void handle(WebSocketSession session, T message);

	/**
	 * 当前处理器处理的消息类型
	 * @return messageType
	 */
	String type();

	/**
	 * 当前处理器对应的消息Class
	 * @return Class
	 */
	Class getMessageClass();

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy