com.eg.agent.android.util.ErrorData Maven / Gradle / Ivy
package com.eg.agent.android.util;
import org.json.JSONObject;
import java.nio.ByteBuffer;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;
import com.eg.agent.android.Agent;
import com.eg.agent.android.logging.AgentLog;
import com.eg.agent.android.logging.AgentLogManager;
/**
* Created by Venkateswari.J on 4/25/2017.
*/
public class ErrorData {
private final String url;
private final int httpStatusCode;
private int count;
private final String responseBody;
private final String stackTrace;
private final Map params;
private final String digest;
private static final AgentLog log = AgentLogManager.getAgentLog();
public ErrorData(String url, int httpStatusCode, String responseBody, Map params) {
this.url = url;
this.httpStatusCode = httpStatusCode;
this.count = 1;
this.responseBody = responseBody;
this.stackTrace = this.getSanitizedStackTrace();
this.params = params;
this.digest = this.computeHash();
}
public String getUrl() {
return this.url;
}
public int getHttpStatusCode() {
return this.httpStatusCode;
}
public int getCount() {
return this.count;
}
public String getResponseBody() {
return this.responseBody;
}
public String getStackTrace() {
return this.stackTrace;
}
public Map getParams() {
return this.params;
}
public String getHash() {
return this.digest;
}
public List
© 2015 - 2024 Weber Informatics LLC | Privacy Policy