package com.sv.socket.event;

import com.common.DeviceDTO;
import com.sv.entity.Device;
import org.springframework.context.ApplicationEvent;

import java.io.Serializable;

public class SocketMessageEvent extends ApplicationEvent implements Serializable {

    private String message;

    private DeviceDTO device;

    /**
     * Create a new ApplicationEvent.
     *
     * @param message the object on which the event initially occurred (never {@code null})
     */
    public SocketMessageEvent(String message,DeviceDTO device) {
        super(message);
        this.message = message;
        this.device = device;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public DeviceDTO getDevice() {
        return device;
    }

}
