[feature](headless)Add request user to data events.
Some checks failed
supersonic CentOS CI / build (21) (push) Has been cancelled
supersonic mac CI / build (21) (push) Has been cancelled
supersonic ubuntu CI / build (21) (push) Has been cancelled
supersonic windows CI / build (21) (push) Has been cancelled

This commit is contained in:
jerryjzhang
2025-10-21 23:28:42 +08:00
parent 7490dabdc3
commit 71feb6c4eb
6 changed files with 150 additions and 89 deletions

View File

@@ -1,27 +1,25 @@
package com.tencent.supersonic.common.pojo;
import com.tencent.supersonic.common.pojo.enums.EventType;
import lombok.Getter;
import org.springframework.context.ApplicationEvent;
import java.util.List;
@Getter
public class DataEvent extends ApplicationEvent {
private List<DataItem> dataItems;
private final List<DataItem> dataItems;
private EventType eventType;
private final EventType eventType;
public DataEvent(Object source, List<DataItem> dataItems, EventType eventType) {
private final String userName;
public DataEvent(Object source, List<DataItem> dataItems, EventType eventType, String userName) {
super(source);
this.dataItems = dataItems;
this.eventType = eventType;
this.userName = userName;
}
public List<DataItem> getDataItems() {
return dataItems;
}
public EventType getEventType() {
return eventType;
}
}