Modify the model's name
This commit is contained in:
parent
df9a6a1212
commit
2f3f397717
|
@ -1,42 +1,42 @@
|
|||
package org.bench4q.share.models.master;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlElementWrapper;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
import org.bench4q.share.models.master.statistics.SampleModel;
|
||||
import org.bench4q.share.models.monitor.ProcessorModel;
|
||||
|
||||
/**
|
||||
* when asked for processor, this will be response
|
||||
*
|
||||
* @author coderfengyun
|
||||
*
|
||||
*/
|
||||
@XmlRootElement
|
||||
public class MonitorProcessorResponseModel implements MonitorResultBase {
|
||||
private List<ProcessorModel> processorModels;
|
||||
|
||||
@XmlElementWrapper
|
||||
@XmlElement(name = "processorModels")
|
||||
public List<ProcessorModel> getProcessorModels() {
|
||||
return processorModels;
|
||||
}
|
||||
|
||||
public void setProcessorModels(List<ProcessorModel> processorModels) {
|
||||
this.processorModels = processorModels;
|
||||
}
|
||||
|
||||
public MonitorProcessorResponseModel() {
|
||||
this.setProcessorModels(new ArrayList<ProcessorModel>());
|
||||
}
|
||||
|
||||
public void add(SampleModel model) {
|
||||
if (model instanceof ProcessorModel) {
|
||||
this.getProcessorModels().add((ProcessorModel) model);
|
||||
}
|
||||
}
|
||||
}
|
||||
package org.bench4q.share.models.master;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlElementWrapper;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
import org.bench4q.share.models.master.statistics.SampleModel;
|
||||
import org.bench4q.share.models.monitor.ProcessorModel;
|
||||
|
||||
/**
|
||||
* when asked for processor, this will be response
|
||||
*
|
||||
* @author coderfengyun
|
||||
*
|
||||
*/
|
||||
@XmlRootElement
|
||||
public class MonitorProcessorResponseModel implements MonitorResultBase {
|
||||
private List<ProcessorModel> processorModels;
|
||||
|
||||
@XmlElementWrapper
|
||||
@XmlElement(name = "processorModel")
|
||||
public List<ProcessorModel> getProcessorModels() {
|
||||
return processorModels;
|
||||
}
|
||||
|
||||
public void setProcessorModels(List<ProcessorModel> processorModels) {
|
||||
this.processorModels = processorModels;
|
||||
}
|
||||
|
||||
public MonitorProcessorResponseModel() {
|
||||
this.setProcessorModels(new ArrayList<ProcessorModel>());
|
||||
}
|
||||
|
||||
public void add(SampleModel model) {
|
||||
if (model instanceof ProcessorModel) {
|
||||
this.getProcessorModels().add((ProcessorModel) model);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue