Package digilib.servlet
Class AsyncServletWorker
- java.lang.Object
-
- digilib.servlet.AsyncServletWorker
-
- All Implemented Interfaces:
Runnable
,EventListener
,javax.servlet.AsyncListener
public class AsyncServletWorker extends Object implements Runnable, javax.servlet.AsyncListener
Worker class for the asynchronous Servlet API.- Author:
- casties
-
-
Constructor Summary
Constructors Constructor Description AsyncServletWorker(DigilibConfiguration dlConfig, ImageJobDescription jobinfo, javax.servlet.AsyncContext asyncContext, Scaler.ErrMsg errMsgType, long startTime)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static long
getTimeout()
void
onComplete(javax.servlet.AsyncEvent event)
void
onError(javax.servlet.AsyncEvent event)
void
onStartAsync(javax.servlet.AsyncEvent event)
void
onTimeout(javax.servlet.AsyncEvent event)
void
run()
runs the ImageWorker and writes the image to the ServletResponse.static void
setTimeout(long timeout)
-
-
-
Constructor Detail
-
AsyncServletWorker
public AsyncServletWorker(DigilibConfiguration dlConfig, ImageJobDescription jobinfo, javax.servlet.AsyncContext asyncContext, Scaler.ErrMsg errMsgType, long startTime)
- Parameters:
dlConfig
- the DigilibConfigurationjobinfo
- the ImageJobDescriptionasyncContext
- the AsyncContexterrMsgType
- the ErrmsgstartTime
- the start time
-
-
Method Detail
-
run
public void run()
runs the ImageWorker and writes the image to the ServletResponse.
-
onStartAsync
public void onStartAsync(javax.servlet.AsyncEvent event) throws IOException
- Specified by:
onStartAsync
in interfacejavax.servlet.AsyncListener
- Throws:
IOException
-
onComplete
public void onComplete(javax.servlet.AsyncEvent event) throws IOException
- Specified by:
onComplete
in interfacejavax.servlet.AsyncListener
- Throws:
IOException
-
onError
public void onError(javax.servlet.AsyncEvent event) throws IOException
- Specified by:
onError
in interfacejavax.servlet.AsyncListener
- Throws:
IOException
-
onTimeout
public void onTimeout(javax.servlet.AsyncEvent event) throws IOException
- Specified by:
onTimeout
in interfacejavax.servlet.AsyncListener
- Throws:
IOException
-
getTimeout
public static long getTimeout()
-
setTimeout
public static void setTimeout(long timeout)
-
-