| | |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.common.factory.ApplicationContextFactory; |
| | | import com.java110.common.log.LoggerEngine; |
| | | import com.java110.common.util.DateUtil; |
| | | 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.net.InetAddress; |
| | | import java.net.UnknownHostException; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * 数据流上下文 |
| | | * Created by wuxw on 2018/5/18. |
| | | */ |
| | | public abstract class AbstractDataFlowContext extends AbstractTransactionLog implements DataFlowContext,Orders,TransactionLog{ |
| | | public abstract class AbstractDataFlowContext extends AbstractTransactionLog implements DataFlowContext, IOrders,TransactionLog{ |
| | | |
| | | private String dataFlowId; |
| | | |
| | |
| | | |
| | | private List<DataFlowLog> logDatas = new ArrayList<DataFlowLog>(); |
| | | |
| | | protected Map<String,String> headers = new HashMap<String,String>(); |
| | | protected Map<String,String> requestHeaders = new HashMap<String,String>(); |
| | | protected Map<String,String> requestCurrentHeaders = new HashMap<String,String>(); |
| | | protected Map<String,String> responseHeaders = new HashMap<String,String>(); |
| | | protected Map<String,String> responseCurrentHeaders = new HashMap<String,String>(); |
| | | |
| | | //请求开始时间 |
| | | private Date startDate; |
| | |
| | | afterBuilder((DataFlowContext) dataFlowContext); |
| | | return dataFlowContext; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 预处理 |
| | |
| | | this.endDate = endDate; |
| | | } |
| | | |
| | | public Map<String, String> getHeaders() { |
| | | return headers; |
| | | public Map<String, String> getRequestHeaders() { |
| | | return requestHeaders; |
| | | } |
| | | |
| | | public Map<String, String> getResponseHeaders() { |
| | | return responseHeaders; |
| | | } |
| | | |
| | | public Map<String, String> getRequestCurrentHeaders() { |
| | | return requestHeaders; |
| | | } |
| | | |
| | | public Map<String, String> getResponseCurrentHeaders() { |
| | | return responseHeaders; |
| | | } |
| | | |
| | | public String getReqData() { |
| | |
| | | |
| | | } |
| | | |
| | | public void setPort(String port) { |
| | | this.port = port; |
| | | } |
| | | |
| | | public String getbId(){ |
| | | return null; |
| | | } |
| | |
| | | } |
| | | |
| | | |
| | | public abstract Orders getOrder(); |
| | | public abstract IOrders getOrder(); |
| | | |
| | | protected AbstractDataFlowContext(Date startDate, String code){ |
| | | this.setStartDate(startDate); |
| | |
| | | } |
| | | |
| | | |
| | | public void setResponseEntity(ResponseEntity responseEntity){ |
| | | |
| | | } |
| | | |
| | | public ResponseEntity getResponseEntity(){ |
| | | return null; |
| | | } |
| | | |
| | | } |