Package digilib.servlet
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:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ScalerNoThread.ErrMsg
type of error messagestatic class
ScalerNoThread.Error
servlet error codes
-
Field Summary
Fields Modifier and Type Field Description protected static org.slf4j.Logger
accountlog
logger for accounting requestsprotected static org.slf4j.Logger
authlog
logger for authentication relatedprotected AuthzOps
authzOp
AuthOps instancestatic File
denyImgFile
authentication error image fileprotected DocuDirCache
dirCache
DocuDirCache instanceprotected DigilibServletConfiguration
dlConfig
DigilibConfiguration instancestatic File
errorImgFile
image error image fileprotected static org.slf4j.Logger
logger
gengeral logger for this classstatic File
notfoundImgFile
not found error image fileprotected boolean
sendFileAllowed
send files as is?protected boolean
useAuthorization
use authorization databasestatic String
version
digilib servlet version (for all components)
-
Constructor Summary
Constructors Constructor Description ScalerNoThread()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods 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
getVersion()
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
-
-
-
-
Field Detail
-
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
-
-
Method Detail
-
init
public void init(javax.servlet.ServletConfig config) throws javax.servlet.ServletException
- Specified by:
init
in interfacejavax.servlet.Servlet
- Overrides:
init
in classjavax.servlet.GenericServlet
- Throws:
javax.servlet.ServletException
-
getLastModified
public long getLastModified(javax.servlet.http.HttpServletRequest request)
- Overrides:
getLastModified
in classjavax.servlet.http.HttpServlet
-
doGet
public void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException
- Overrides:
doGet
in classjavax.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 classjavax.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 classjavax.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 classjavax.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 HttpServletRequestresponse
- 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 ErrMsgerror
- the Errormsg
- the msgresponse
- the HttpServletResponse
-
getVersion
public static String getVersion()
- Returns:
- the version
-
-