|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectjavax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.apache.lenya.cms.scheduler.LoadQuartzServlet
public class LoadQuartzServlet
A simple servlet that starts an instance of a Quartz scheduler.
| Field Summary | |
|---|---|
protected static java.lang.String |
ADD
|
static java.lang.String |
CONFIGURATION_ELEMENT
|
protected static java.lang.String |
DELETE
|
protected static java.lang.String |
DOCUMENT_DELETED
|
protected static java.lang.String |
MODIFY
|
static java.lang.String |
PARAMETER_ACTION
|
static java.lang.String |
PARAMETER_DOCUMENT_URL
|
static java.lang.String |
PARAMETER_PUBLICATION_ID
|
static java.lang.String |
PREFIX
|
static java.lang.String |
SERVLET_URL
|
| Constructor Summary | |
|---|---|
LoadQuartzServlet()
|
|
| Method Summary | |
|---|---|
void |
deleteDocumentJobs(Document document)
Deletes |
void |
destroy()
Shuts down the scheduler. |
static void |
destroyScheduler()
Shuts down the scheduler. |
void |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Handles a GET request. |
void |
doPost(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
Handles a POST request. |
static java.lang.String |
getDeleteDocumentRequestURI(java.lang.String port,
java.lang.String servletContextPath,
Document document)
Generates the request URI needed to delete the jobs for a certain document. |
protected java.lang.String |
getJobId(NamespaceMap schedulerParameters)
Extracts the job ID from the scheduler parameters. |
static SchedulerWrapper |
getScheduler()
Returns the scheduler wrapper. |
static NamespaceMap |
getSchedulerParameters(javax.servlet.http.HttpServletRequest request)
Extracts the scheduler parameters from a request. |
static LoadQuartzServlet |
getServlet(java.lang.String contextPath)
Returns the servlet for a certain canonical servlet context path. |
java.io.File |
getServletContextDirectory()
Returns the servlet context path. |
protected void |
handleRequest(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Handles a servlet request. |
void |
init(javax.servlet.ServletConfig config)
Initializes the servlet. |
protected void |
logSessionAttributes(javax.servlet.http.HttpServletRequest request)
Logs the session attributes of a request. |
void |
process()
Process. |
void |
restoreJobs()
Restores the jobs. |
static void |
ShutdownHook()
This method sets a ShutdownHook to the system This traps the CTRL+C or kill signal and shutdows Correctly the system. |
| Methods inherited from class javax.servlet.http.HttpServlet |
|---|
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service |
| Methods inherited from class javax.servlet.GenericServlet |
|---|
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 Detail |
|---|
public static final java.lang.String PREFIX
public static final java.lang.String PARAMETER_ACTION
public static final java.lang.String PARAMETER_PUBLICATION_ID
public static final java.lang.String PARAMETER_DOCUMENT_URL
public static final java.lang.String CONFIGURATION_ELEMENT
protected static final java.lang.String ADD
protected static final java.lang.String MODIFY
protected static final java.lang.String DELETE
protected static final java.lang.String DOCUMENT_DELETED
public static final java.lang.String SERVLET_URL
| Constructor Detail |
|---|
public LoadQuartzServlet()
| Method Detail |
|---|
public static SchedulerWrapper getScheduler()
public void init(javax.servlet.ServletConfig config)
throws javax.servlet.ServletException
init in interface javax.servlet.Servletinit in class javax.servlet.GenericServletconfig - The servlet configuration.
javax.servlet.ServletException - when something went wrong.
public void process()
throws javax.servlet.ServletException,
org.quartz.SchedulerException
javax.servlet.ServletException - when an error occurs.
org.quartz.SchedulerException - when an error occurs.public void destroy()
destroy in interface javax.servlet.Servletdestroy in class javax.servlet.GenericServletpublic static void destroyScheduler()
public static void ShutdownHook()
throws java.lang.Exception
java.lang.Exception - when something went wrong.
public void doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.io.IOException,
javax.servlet.ServletException
doGet in class javax.servlet.http.HttpServletrequest - The request.response - The response.
java.io.IOException - when an error occured.
javax.servlet.ServletException - when an error occured.
public void doPost(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
throws javax.servlet.ServletException,
java.io.IOException
doPost in class javax.servlet.http.HttpServletreq - The requust.resp - The response.
javax.servlet.ServletException - when an error occured.
java.io.IOException - when an error occured.
protected void handleRequest(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.io.IOException
request - The request.response - The response.
java.io.IOException - when something went wrong.public static NamespaceMap getSchedulerParameters(javax.servlet.http.HttpServletRequest request)
request - The request.
public void deleteDocumentJobs(Document document)
throws DocumentBuildException,
org.quartz.SchedulerException,
PublicationException
document -
DocumentBuildException
org.quartz.SchedulerException
PublicationExceptionprotected java.lang.String getJobId(NamespaceMap schedulerParameters)
schedulerParameters - A namespace map.
protected void logSessionAttributes(javax.servlet.http.HttpServletRequest request)
request - The request.public java.io.File getServletContextDirectory()
public void restoreJobs()
throws org.quartz.SchedulerException
org.quartz.SchedulerException - when something went wrong.public static LoadQuartzServlet getServlet(java.lang.String contextPath)
contextPath - The canonical servlet context path.
public static java.lang.String getDeleteDocumentRequestURI(java.lang.String port,
java.lang.String servletContextPath,
Document document)
document - The document.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||