Clover coverage report - CRISPY - 1.1.1
Coverage timestamp: Mi Nov 15 2006 13:09:46 CET
file stats: LOC: 46   Methods: 5
NCLOC: 26   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
CauchoServlet.java - 100% 100% 100%
coverage
 1    package net.sf.crispy.impl.caucho;
 2   
 3    import java.util.Hashtable;
 4    import java.util.Map;
 5   
 6    import javax.servlet.http.HttpServlet;
 7    import javax.servlet.http.HttpServletRequest;
 8   
 9    import org.apache.commons.logging.Log;
 10    import org.apache.commons.logging.LogFactory;
 11   
 12    /**
 13    * Parent class from burlap and hessian server side implementation.
 14    *
 15    * @author Linke
 16    *
 17    */
 18    public class CauchoServlet extends HttpServlet {
 19   
 20    protected static final Log log = LogFactory.getLog (CauchoServlet.class);
 21   
 22    private static final long serialVersionUID = 471335728357234L;
 23    private Map cache = new Hashtable();
 24   
 25    // protected void doGet(HttpServletRequest pvRequest, HttpServletResponse pvResponse) throws ServletException, IOException {
 26    // doPost(pvRequest, pvResponse);
 27    // }
 28   
 29  13 public Object addCache(String pvKey, Object pvValue) {
 30  13 return cache.put(pvKey, pvValue);
 31    }
 32   
 33  110 public Object getFromCache(String pvKey) { return cache.get(pvKey); }
 34  1 public void clearCahce() { cache.clear(); }
 35  2 public int getCacheSize() { return cache.size(); }
 36   
 37  163 public String getCacheKey (HttpServletRequest pvRequest) {
 38  163 String lvUri = pvRequest.getRequestURI();
 39    if (log.isDebugEnabled()) { log.debug("Request-URI: " + lvUri); }
 40  163 int lvLastIndex = lvUri.lastIndexOf("/");
 41  163 lvUri = lvUri.substring(lvLastIndex + 1);
 42    if (log.isDebugEnabled()) { log.debug("Cache-Key: " + lvUri); }
 43  163 return lvUri;
 44    }
 45   
 46    }