package com.fjhx.event;

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

/**
 * webStock推送消息成功事件
 */
@Getter
public class WebSocketSendSuccessEvent extends ApplicationEvent {

    private final MessageEntity messageEntity;

    public WebSocketSendSuccessEvent(WebSocketServer source, MessageEntity messageEntity) {
        super(source);
        this.messageEntity = messageEntity;
    }

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

}