Package digilib.servlet
Class Scaler
- java.lang.Object
-
- javax.servlet.GenericServlet
-
- javax.servlet.http.HttpServlet
-
- digilib.servlet.Scaler
-
- All Implemented Interfaces:
Serializable
,javax.servlet.Servlet
,javax.servlet.ServletConfig
@WebServlet(name="Scaler", urlPatterns={"/Scaler/*","/servlet/Scaler/*"}, asyncSupported=true) public class Scaler extends javax.servlet.http.HttpServlet
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Scaler.ErrMsg
type of error messagestatic class
Scaler.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
AuthzOps instancestatic Scaler.ErrMsg
defaultErrMsgType
default error message typestatic File
denyImgFile
authentication error image fileprotected DocuDirCache
dirCache
DocuDirCache instanceprotected DigilibServletConfiguration
dlConfig
DigilibConfiguration instancestatic File
errorImgFile
image error image fileprotected DigilibJobCenter<DocuImage>
imageJobCenter
Image executorprotected 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 Scaler()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
digilibError(Scaler.ErrMsg type, Scaler.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)
Returns modification time relevant to the request for caching.static String
getVersion()
void
init(javax.servlet.ServletConfig config)
Initialisation on first run.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)
-
defaultErrMsgType
public static Scaler.ErrMsg defaultErrMsgType
default error message type
-
accountlog
protected static final org.slf4j.Logger accountlog
logger for accounting requests
-
logger
protected static final org.slf4j.Logger logger
gengeral logger for this class
-
authlog
protected static final org.slf4j.Logger authlog
logger for authentication related
-
dirCache
protected DocuDirCache dirCache
DocuDirCache instance
-
imageJobCenter
protected DigilibJobCenter<DocuImage> imageJobCenter
Image executor
-
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
AuthzOps instance
-
-
Method Detail
-
init
public void init(javax.servlet.ServletConfig config) throws javax.servlet.ServletException
Initialisation on first run.- Specified by:
init
in interfacejavax.servlet.Servlet
- Overrides:
init
in classjavax.servlet.GenericServlet
- Throws:
javax.servlet.ServletException
- See Also:
Servlet.init(javax.servlet.ServletConfig)
-
getLastModified
public long getLastModified(javax.servlet.http.HttpServletRequest request)
Returns modification time relevant to the request for caching.- Overrides:
getLastModified
in classjavax.servlet.http.HttpServlet
- See Also:
HttpServlet.getLastModified(javax.servlet.http.HttpServletRequest)
-
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
-response
-- Throws:
javax.servlet.ServletException
-
digilibError
public static void digilibError(Scaler.ErrMsg type, Scaler.Error error, String msg, javax.servlet.http.HttpServletResponse response)
Sends an error to the client as text or image.- Parameters:
type
-error
-msg
-response
-
-
getVersion
public static String getVersion()
-
-