java110
2020-05-30 b480fc1df57d1e11b836f6dac27bff4d25617a05
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
package com.java110.core.event.app;
 
import com.alibaba.fastjson.JSONArray;
import com.java110.core.context.AppContext;
 
import java.util.EventObject;
 
/**
 *
 * java110 事件
 * Created by wuxw on 2017/4/14.
 */
public class AppEvent extends EventObject {
 
    private AppContext context;
 
    //这个类每次都会创建,所以是线程安全的
    private JSONArray data ;
 
 
    /**
     * Constructs a prototypical Event.
     *
     * @param source The object on which the Event initially occurred.
     * @throws IllegalArgumentException if source is null.
     */
    public AppEvent(Object source,AppContext context) {
        super(source);
        this.context= context;
    }
 
    public AppContext getContext() {
        return context;
    }
 
    public void setContext(AppContext context) {
        this.context = context;
    }
 
 
    public JSONArray getData(){
        return data;
    }
 
    public void setData(JSONArray data){
        this.data = data;
    }
}