wuxw
2022-07-19 05683f2b2bdbdbe21cf17ad523c21ab338bd1c54
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
package com.java110.core.context;
 
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.java110.entity.center.Business;
import com.java110.entity.center.DataFlowLinksCost;
import com.java110.entity.center.DataFlowLog;
import org.springframework.http.ResponseEntity;
 
import java.util.List;
import java.util.Map;
 
/**
 * 数据流上下文
 * Created by wuxw on 2018/5/18.
 */
public interface DataFlowContext {
 
    /**
     * 请求报文
     * @return
     */
     String getReqData();
 
    //AppId
     String getAppId();
 
     //userId
     String getUserId();
 
     JSONObject getReqJson();
    /**
     * 返回报文
     * @return
     */
     JSONObject getResJson();
 
 
    /**
     * 添加各个环节的耗时
     * @param dataFlowLinksCost
     */
     void addLinksCostDates(DataFlowLinksCost dataFlowLinksCost);
 
    /**
     * 添加日志信息
     * @param dataFlowLog
     */
     void addLogDatas(DataFlowLog dataFlowLog);
 
     List<DataFlowLinksCost> getLinksCostDates();
 
     List<Business> getBusinesses();
 
    /**
     * 源请求头信息
     * @return
     */
     Map<String, String> getRequestHeaders();
    /**
     * 终返回头信息
     * @return
     */
     Map<String, String> getResponseHeaders();
 
    /**
     * 当前请求头信息
     * @return
     */
     Map<String, String> getRequestCurrentHeaders();
 
    /**
     * 当前返回头信息
     * @return
     */
     Map<String, String> getResponseCurrentHeaders();
 
 
     IOrders getOrder();
 
 
    /**
     * 获取当前Business
     * @return
     */
    public Business getCurrentBusiness();
 
    public void setResJson(JSONObject resJson);
 
    /**
     * 获取参数
     * @return
     */
    public Map<String, Object> getParamOut();
 
    /**
     * 添加参数
     * @param key
     * @param value
     */
    public void addParamOut(String key,Object value);
 
 
    public String getbId();
 
    //业务编码,如果是批量受理就取第一个
    public String getServiceCode();
 
    public void setResponseEntity(ResponseEntity responseEntity);
 
    public ResponseEntity getResponseEntity();
 
    /**
     * 获取调用订单服务业务
     * @return
     */
    public JSONArray getServiceBusiness();
 
    /**
     * 设置订单服务业务
     * @param serviceBusiness
     */
    public void addServiceBusiness(JSONObject serviceBusiness);
    /**
     * 设置订单服务业务
     * @param serviceBusinesses
     */
    public void setServiceBusiness(JSONArray serviceBusinesses);
}