All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.eg.agent.android.common.TransactionData Maven / Gradle / Ivy

There is a newer version: 2.1.3
Show newest version
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package com.eg.agent.android.common;

public class TransactionData
{
    private final long timestamp;
    private final String url;
    private final String httpMethod;

    private final float time;
    private final int statusCode;
    private int errorCode;

    private final long bytesSent;
    private final long bytesReceived;
    private final String appData;

    private  String errorMessage;

    public String getErrorMessage()
    {
        return this.errorMessage;
    }

    public void setErrorMessage(String errorMessage) {
        this.errorMessage = errorMessage;
    }
    public TransactionData(String url, String httpMethod, float time, int statusCode, int errorCode, long bytesSent, long bytesReceived, String appData)
    {
        int endPos = url.indexOf(63);
        if(endPos < 0)
        {
            endPos = url.indexOf(59);
            if(endPos < 0)
            {
                endPos = url.length();
            }
        }
        String trimmedUrl = url.substring(0, endPos);
        this.url = trimmedUrl;
        this.httpMethod = httpMethod;
        this.time = time;
        this.statusCode = statusCode;
        this.errorCode = errorCode;
        this.bytesSent = bytesSent;
        this.bytesReceived = bytesReceived;
        this.appData = appData;
        this.timestamp = System.currentTimeMillis();
    }

    public String getUrl()
    {
        return this.url;
    }
    public String getHttpMethod()
    {
        return this.httpMethod;
    }

    public int getStatusCode()
    {
        return this.statusCode;
    }
    public int getErrorCode() {
        return this.errorCode;
    }

    public void setErrorCode(int errorCode)
    {
        this.errorCode=errorCode;
    }
    public long getBytesSent()
    {
        return this.bytesSent;
    }
    public long getBytesReceived()
    {
        return this.bytesReceived;
    }
    public String getAppData()
    {
        return this.appData;
    }

    public float getTime()
    {
        return this.time;
    }

    public String toString()
    {
        return("timestamp=" + this.timestamp + ", " +
                "url=\'" + this.url + '\'' + ", " +
                "httpMethod=\'" + this.httpMethod + '\'' + "," +
                " time=" + this.time + ", " +
                "statusCode=" + this.statusCode + ", " +
                "errorCode=" + this.errorCode + ", " +
                "error Message=" + this.errorMessage + ", " +
                "bytesSent=" + this.bytesSent + ", " +
                "bytesReceived=" + this.bytesReceived +  '}');

    }
    public long getTimestamp() {
        return this.timestamp;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy