package com.pccw.service.impl;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.servlet.ServletRequest;
import javax.servlet.http.HttpServletRequest;
import com.caucho.hessian.server.HessianServlet;
import com.caucho.services.server.ServiceContext;
import com.pccw.service.iace.IHello;
import com.pccw.service.iace.MyCar;
public class IHelloImpl implements IHello {
private static final long serialVersionUID = -5313447584359482941L;
public MyCar getMyCar() {
MyCar car = new MyCar();
car.setCarName("阿斯顿·马丁");
car.setCarModel("One-77");
return car;
}
public Map<String, String> myBabays() {
ServletRequest request=ServiceContext.getContextRequest();
System.out.println(((HttpServletRequest)request).getSession());
Map<String, String> map = new HashMap<String, String>();
map.put("son", "孙吴空");
map.put("daughter", "孙小美");
return map;
}
public List<String> myLoveFruit() {
List<String> list = new ArrayList<String>();
list.add("apple");
list.add("kiwi");
list.add("orange");
return list;
}
public String sayHello() {
return "welcom to Hessian";
}
public void save(String msg) {
System.out.println("Save Message:"+msg);
}
}