Scenario added.

This commit is contained in:
Zhen Tang 2013-06-26 15:11:24 +08:00
parent 7a111adffe
commit 3d958fe8c5
4 changed files with 142 additions and 0 deletions

View File

@ -0,0 +1,29 @@
package org.bench4q.agent.scenario;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement(name = "parameter")
public class Parameter {
private String key;
private String value;
@XmlElement
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
@XmlElement
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
}

View File

@ -0,0 +1,32 @@
package org.bench4q.agent.scenario;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement(name = "scenario")
public class Scenario {
private UsePlugin[] usePlugins;
private UserBehavior[] userBehaviors;
@XmlElementWrapper(name = "plugins")
@XmlElement(name = "plugin")
public UsePlugin[] getUsePlugins() {
return usePlugins;
}
public void setUsePlugins(UsePlugin[] usePlugins) {
this.usePlugins = usePlugins;
}
@XmlElementWrapper(name = "userBehaviors")
@XmlElement(name = "userBehavior")
public UserBehavior[] getUserBehaviors() {
return userBehaviors;
}
public void setUserBehaviors(UserBehavior[] userBehaviors) {
this.userBehaviors = userBehaviors;
}
}

View File

@ -0,0 +1,41 @@
package org.bench4q.agent.scenario;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement(name = "usePlugin")
public class UsePlugin {
private String id;
private String name;
private Parameter[] parameters;
@XmlElement
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
@XmlElement
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@XmlElementWrapper(name = "parameters")
@XmlElement(name = "parameter")
public Parameter[] getParameters() {
return parameters;
}
public void setParameters(Parameter[] parameters) {
this.parameters = parameters;
}
}

View File

@ -0,0 +1,40 @@
package org.bench4q.agent.scenario;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement(name = "userBehavior")
public class UserBehavior {
private String use;
private String name;
private Parameter[] parameters;
@XmlElement
public String getUse() {
return use;
}
public void setUse(String use) {
this.use = use;
}
@XmlElement
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@XmlElementWrapper(name = "parameters")
@XmlElement(name = "parameter")
public Parameter[] getParameters() {
return parameters;
}
public void setParameters(Parameter[] parameters) {
this.parameters = parameters;
}
}