老师给的在线航班系统

源代码在线查看: request.java

软件大小: 109 K
上传用户: aoneko2009
关键词:
下载地址: 免注册下载 普通下载 VIP

相关代码

				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;
					}
				}
							

相关资源