mirror of
https://github.com/hpd840321/starRiverProperty.git
synced 2026-06-09 16:30:29 +08:00
dee355b4a7
- artifacts/decompiled 树与相关源码变更 - maven-cw-elevator-application 业务 docs 与 package-info - scripts 下 formatter 校验与辅助脚本 - 其他子工程/接口与发布线一并纳入版本控制 Made-with: Cursor Former-commit-id: e102e8cab64e575bcd23c9a66a598aa1892bb492
55 lines
710 B
Java
55 lines
710 B
Java
package cn.cloudwalk.event.task;
|
|
|
|
import cn.cloudwalk.cwos.client.event.event.BaseEvent;
|
|
import cn.cloudwalk.event.handler.EventHandler;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public class EventHandleTask<E extends BaseEvent>
|
|
{
|
|
private E event;
|
|
private EventHandler<E> handler;
|
|
|
|
public EventHandleTask(E event, EventHandler<E> handler) {
|
|
this.event = event;
|
|
this.handler = handler;
|
|
}
|
|
|
|
public String start() {
|
|
this.handler.onEvent((BaseEvent)this.event);
|
|
return this.event.getMessageId();
|
|
}
|
|
|
|
public E getEvent() {
|
|
return this.event;
|
|
}
|
|
|
|
public void setEvent(E event) {
|
|
this.event = event;
|
|
}
|
|
|
|
public EventHandler<E> getHandler() {
|
|
return this.handler;
|
|
}
|
|
|
|
public void setHandler(EventHandler<E> handler) {
|
|
this.handler = handler;
|
|
}
|
|
}
|
|
|
|
|