1 16 package org.directwebremoting.servlet; 17 18 import java.io.IOException ; 19 20 import javax.servlet.http.HttpServletRequest ; 21 import javax.servlet.http.HttpServletResponse ; 22 23 import org.directwebremoting.dwrp.PlainCallMarshaller; 24 import org.directwebremoting.extend.Calls; 25 import org.directwebremoting.extend.Handler; 26 import org.directwebremoting.extend.Remoter; 27 import org.directwebremoting.extend.Replies; 28 29 33 public class PlainCallHandler implements Handler 34 { 35 38 public void handle(HttpServletRequest request, HttpServletResponse response) throws IOException 39 { 40 Calls calls = null; 41 42 try 43 { 44 calls = plainCallMarshaller.marshallInbound(request, response); 45 } 46 catch (Exception ex) 47 { 48 plainCallMarshaller.marshallException(request, response, ex); 49 return; 50 } 51 52 Replies replies = remoter.execute(calls); 53 plainCallMarshaller.marshallOutbound(replies, request, response); 54 } 55 56 60 public void setPlainCallMarshaller(PlainCallMarshaller marshaller) 61 { 62 this.plainCallMarshaller = marshaller; 63 } 64 65 69 public void setRemoter(Remoter remoter) 70 { 71 this.remoter = remoter; 72 } 73 74 77 protected PlainCallMarshaller plainCallMarshaller = null; 78 79 82 protected Remoter remoter = null; 83 } 84 | Popular Tags |