remove redundant code

This commit is contained in:
Tienan Chen 2013-11-29 09:56:15 +08:00
parent 275da0f97a
commit 7aa7926100
2 changed files with 0 additions and 207 deletions

View File

@ -1,113 +0,0 @@
package org.bench4q.agent.api.model;
import java.io.ByteArrayOutputStream;
import java.util.Date;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
import javax.xml.bind.Marshaller;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import org.bench4q.agent.scenario.BehaviorResult;
@XmlRootElement(name = "testDetail")
public class TestDetailModel {
private String pluginId;
private String pluginName;
private String behaviorName;
private Date startDate;
private Date endDate;
private long responseTime;
private boolean success;
@XmlElement
public String getPluginId() {
return pluginId;
}
public void setPluginId(String pluginId) {
this.pluginId = pluginId;
}
@XmlElement
public String getPluginName() {
return pluginName;
}
public void setPluginName(String pluginName) {
this.pluginName = pluginName;
}
@XmlElement
public String getBehaviorName() {
return behaviorName;
}
public void setBehaviorName(String behaviorName) {
this.behaviorName = behaviorName;
}
@XmlElement
public Date getStartDate() {
return startDate;
}
public void setStartDate(Date startDate) {
this.startDate = startDate;
}
@XmlElement
public Date getEndDate() {
return endDate;
}
public void setEndDate(Date endDate) {
this.endDate = endDate;
}
@XmlElement
public long getResponseTime() {
return responseTime;
}
public void setResponseTime(long responseTime) {
this.responseTime = responseTime;
}
@XmlElement
public boolean isSuccess() {
return success;
}
public void setSuccess(boolean success) {
this.success = success;
}
public TestDetailModel() {
}
public TestDetailModel(BehaviorResult behaviorResult) {
this.setBehaviorName(behaviorResult.getBehaviorName());
this.setEndDate(behaviorResult.getEndDate());
this.setPluginId(behaviorResult.getPluginId());
this.setPluginName(behaviorResult.getPluginName());
this.setResponseTime(behaviorResult.getResponseTime());
this.setStartDate(behaviorResult.getStartDate());
this.setSuccess(behaviorResult.isSuccess());
}
public String getModelString() {
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
Marshaller marshaller;
try {
marshaller = JAXBContext.newInstance(TestDetailModel.class)
.createMarshaller();
marshaller.marshal(this, outputStream);
return outputStream.toString();
} catch (JAXBException e) {
e.printStackTrace();
return "";
}
}
}

View File

@ -1,94 +0,0 @@
package org.bench4q.agent.api.model;
import java.util.Date;
import java.util.List;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement(name = "testDetailStatus")
public class TestDetailStatusModel {
private Date startDate;
private long elapsedTime;
private int successCount;
private int failCount;
private int finishedCount;
private int totalCount;
private double averageResponseTime;
private List<TestDetailModel> testDetailModels;
@XmlElement
public Date getStartDate() {
return startDate;
}
public void setStartDate(Date startDate) {
this.startDate = startDate;
}
@XmlElement
public long getElapsedTime() {
return elapsedTime;
}
public void setElapsedTime(long elapsedTime) {
this.elapsedTime = elapsedTime;
}
@XmlElement
public int getSuccessCount() {
return successCount;
}
public void setSuccessCount(int successCount) {
this.successCount = successCount;
}
@XmlElement
public int getFailCount() {
return failCount;
}
public void setFailCount(int failCount) {
this.failCount = failCount;
}
@XmlElement
public int getFinishedCount() {
return finishedCount;
}
public void setFinishedCount(int finishedCount) {
this.finishedCount = finishedCount;
}
@XmlElement
public int getTotalCount() {
return totalCount;
}
public void setTotalCount(int totalCount) {
this.totalCount = totalCount;
}
@XmlElement
public double getAverageResponseTime() {
return averageResponseTime;
}
public void setAverageResponseTime(double averageResponseTime) {
this.averageResponseTime = averageResponseTime;
}
@XmlElementWrapper(name = "testDetails")
@XmlElement(name = "testDetail")
public List<TestDetailModel> getTestDetailModels() {
return testDetailModels;
}
public void setTestDetailModels(List<TestDetailModel> testDetailModels) {
this.testDetailModels = testDetailModels;
}
}