package com.toa.abs.model;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;
/**
* Request类封装一个请求
* @author tangliang
*
*/
public class Request implements Serializable{
public static final int GET_AIRPORT_LIST_REQ=0;
public static final int LOGIN_REQ=1;
public static final int QUERY_FLIGHT_REQ=2;
public static final int ORDER_FLIGHT_REQ=3;
public static final int CANCEL_ORDER_REQ=4;
public static final int QUIT_REQ=5;
private int type;
private Map parameters;//请求所带的参数
private static final long serialVersionUID = 801120791203985L;
public Request(int type){
parameters=new HashMap();
this.type=type;
}
public void addParameter(String name,Object value){
this.parameters.put(name,value);
}
public Object getData(String key){
return this.parameters.get(key);
}
public Map getAllParameters(){
return this.parameters;
}
public int getType(){
return type;
}
}