Class ObjectFileServlet

  • All Implemented Interfaces:
    java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
    Direct Known Subclasses:
    ObjectFileServlet.Loose, ObjectFileServlet.PackData

    abstract class ObjectFileServlet
    extends javax.servlet.http.HttpServlet
    Sends any object from GIT_DIR/objects/??/0 38, or any pack file.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String contentType  
      private static long serialVersionUID  
    • Constructor Summary

      Constructors 
      Constructor Description
      ObjectFileServlet​(java.lang.String contentType)  
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      void doGet​(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse rsp)
      protected void doHead​(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse rsp)
      (package private) abstract java.lang.String etag​(FileSender sender)  
      private static java.io.File objects​(javax.servlet.http.HttpServletRequest req)  
      private void serve​(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse rsp, boolean sendBody)  
      • Methods inherited from class javax.servlet.http.HttpServlet

        doDelete, doOptions, doPost, doPut, doTrace, getLastModified, service, service
      • Methods inherited from class javax.servlet.GenericServlet

        destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • contentType

        private final java.lang.String contentType
    • Constructor Detail

      • ObjectFileServlet

        ObjectFileServlet​(java.lang.String contentType)
    • Method Detail

      • etag

        abstract java.lang.String etag​(FileSender sender)
                                throws java.io.IOException
        Throws:
        java.io.IOException
      • doGet

        public void doGet​(javax.servlet.http.HttpServletRequest req,
                          javax.servlet.http.HttpServletResponse rsp)
                   throws java.io.IOException
        Overrides:
        doGet in class javax.servlet.http.HttpServlet
        Throws:
        java.io.IOException
      • doHead

        protected void doHead​(javax.servlet.http.HttpServletRequest req,
                              javax.servlet.http.HttpServletResponse rsp)
                       throws javax.servlet.ServletException,
                              java.io.IOException
        Overrides:
        doHead in class javax.servlet.http.HttpServlet
        Throws:
        javax.servlet.ServletException
        java.io.IOException
      • serve

        private void serve​(javax.servlet.http.HttpServletRequest req,
                           javax.servlet.http.HttpServletResponse rsp,
                           boolean sendBody)
                    throws java.io.IOException
        Throws:
        java.io.IOException
      • objects

        private static java.io.File objects​(javax.servlet.http.HttpServletRequest req)