Class ScalerNoThread

java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
digilib.servlet.ScalerNoThread
All Implemented Interfaces:
Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class ScalerNoThread extends javax.servlet.http.HttpServlet
Version of Scaler servlet that doesn't use a thread pool.
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
    type of error message
    static enum 
    servlet error codes
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected static org.slf4j.Logger
    logger for accounting requests
    protected static org.slf4j.Logger
    logger for authentication related
    protected AuthzOps
    AuthOps instance
    static File
    authentication error image file
    protected DocuDirCache
    DocuDirCache instance
    DigilibConfiguration instance
    static File
    image error image file
    protected static org.slf4j.Logger
    gengeral logger for this class
    static File
    not found error image file
    protected boolean
    send files as is?
    protected boolean
    use authorization database
    static final String
    digilib servlet version (for all components)
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    digilibError(ScalerNoThread.ErrMsg type, ScalerNoThread.Error error, String msg, javax.servlet.http.HttpServletResponse response)
    Sends an error to the client as text or image.
    void
    doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
     
    protected void
    doHead(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
     
    protected void
    doOptions(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
     
    void
    doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
     
    long
    getLastModified(javax.servlet.http.HttpServletRequest request)
     
    static String
     
    void
    init(javax.servlet.ServletConfig config)
     
    void
    processRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
    Service this request using the response.

    Methods inherited from class javax.servlet.http.HttpServlet

    doDelete, doPut, doTrace, service, service

    Methods inherited from class javax.servlet.GenericServlet

    destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log

    Methods inherited from class java.lang.Object

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

    • version

      public static final String version
      digilib servlet version (for all components)
    • accountlog

      protected static org.slf4j.Logger accountlog
      logger for accounting requests
    • logger

      protected static org.slf4j.Logger logger
      gengeral logger for this class
    • authlog

      protected static org.slf4j.Logger authlog
      logger for authentication related
    • dirCache

      protected DocuDirCache dirCache
      DocuDirCache instance
    • denyImgFile

      public static File denyImgFile
      authentication error image file
    • errorImgFile

      public static File errorImgFile
      image error image file
    • notfoundImgFile

      public static File notfoundImgFile
      not found error image file
    • sendFileAllowed

      protected boolean sendFileAllowed
      send files as is?
    • dlConfig

      protected DigilibServletConfiguration dlConfig
      DigilibConfiguration instance
    • useAuthorization

      protected boolean useAuthorization
      use authorization database
    • authzOp

      protected AuthzOps authzOp
      AuthOps instance
  • Constructor Details

    • ScalerNoThread

      public ScalerNoThread()
  • Method Details

    • init

      public void init(javax.servlet.ServletConfig config) throws javax.servlet.ServletException
      Specified by:
      init in interface javax.servlet.Servlet
      Overrides:
      init in class javax.servlet.GenericServlet
      Throws:
      javax.servlet.ServletException
    • getLastModified

      public long getLastModified(javax.servlet.http.HttpServletRequest request)
      Overrides:
      getLastModified in class javax.servlet.http.HttpServlet
    • doGet

      public void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException
      Overrides:
      doGet in class javax.servlet.http.HttpServlet
      Throws:
      javax.servlet.ServletException
    • doPost

      public void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException
      Overrides:
      doPost in class javax.servlet.http.HttpServlet
      Throws:
      javax.servlet.ServletException
    • doHead

      protected void doHead(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws javax.servlet.ServletException, IOException
      Overrides:
      doHead in class javax.servlet.http.HttpServlet
      Throws:
      javax.servlet.ServletException
      IOException
    • doOptions

      protected void doOptions(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws javax.servlet.ServletException, IOException
      Overrides:
      doOptions in class javax.servlet.http.HttpServlet
      Throws:
      javax.servlet.ServletException
      IOException
    • processRequest

      public void processRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException
      Service this request using the response.
      Parameters:
      request - the HttpServletRequest
      response - the HttpServletResponse
      Throws:
      javax.servlet.ServletException - on error
    • digilibError

      public static void digilibError(ScalerNoThread.ErrMsg type, ScalerNoThread.Error error, String msg, javax.servlet.http.HttpServletResponse response)
      Sends an error to the client as text or image.
      Parameters:
      type - the ErrMsg
      error - the Error
      msg - the msg
      response - the HttpServletResponse
    • getVersion

      public static String getVersion()
      Returns:
      the version