1 /*2 * Copyright (C) The MX4J Contributors.3 * All rights reserved.4 *5 * This software is distributed under the terms of the MX4J License version 1.0.6 * See the terms of the MX4J License in the documentation provided with this software.7 */8 9 package mx4j.tools.remote.caucho.burlap;10 11 import java.io.InputStream ;12 import java.io.OutputStream ;13 14 import javax.servlet.ServletException ;15 16 import mx4j.tools.remote.caucho.CauchoInput;17 import mx4j.tools.remote.caucho.CauchoOutput;18 import mx4j.tools.remote.caucho.CauchoService;19 import mx4j.tools.remote.caucho.CauchoServlet;20 21 /**22 * @version $23 */24 public class BurlapServlet extends CauchoServlet25 {26 private CauchoService service;27 28 public void init() throws ServletException 29 {30 super.init();31 service = createService();32 }33 34 protected CauchoService createService()35 {36 return new CauchoService("burlap");37 }38 39 public void destroy()40 {41 this.service = null;42 }43 44 protected Object getService()45 {46 return service;47 }48 49 protected CauchoInput createCauchoInput(InputStream stream)50 {51 return new BurlapCauchoInput(stream);52 }53 54 protected CauchoOutput createCauchoOutput(OutputStream stream)55 {56 return new BurlapCauchoOutput(stream);57 }58 }59