package com.fjhx.event;

import com.fjhx.service.WebSocketServer;
import lombok.Getter;
import org.springframework.context.ApplicationEvent;

/**
 * webStock接收消息事件
 */
@Getter
public class WebSocketOnMessageEvent extends ApplicationEvent {

    private final String message;

    public WebSocketOnMessageEvent(WebSocketServer source, String message) {
        super(source);
        this.message = message;
    }

    @Override
    public WebSocketServer getSource() {
        return (WebSocketServer) super.getSource();
    }

}