com.instantbank.lettertemplate.control.web
Class LoadCrontabServlet

java.lang.Object
  |
  +--javax.servlet.GenericServlet
        |
        +--javax.servlet.http.HttpServlet
              |
              +--com.instantbank.lettertemplate.control.web.LoadCrontabServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class LoadCrontabServlet
extends javax.servlet.http.HttpServlet

This Servlet has been adapted from the original one contained in SourceForgeNet's JCrontab project.

Original author: Israel Olalla
Adapted by: CincoSoft Ltda

See Also:
Serialized Form

Field Summary
private  org.jcrontab.Crontab crontab
           
 
Fields inherited from class javax.servlet.http.HttpServlet
HEADER_IFMODSINCE, HEADER_LASTMOD, LSTRING_FILE, lStrings, METHOD_DELETE, METHOD_GET, METHOD_HEAD, METHOD_OPTIONS, METHOD_POST, METHOD_PUT, METHOD_TRACE
 
Fields inherited from class javax.servlet.GenericServlet
config
 
Constructor Summary
LoadCrontabServlet()
           
 
Method Summary
protected  java.io.InputStream createPropertiesStream(java.lang.String name)
           
 void destroy()
           
 void doStop()
           
 void init(javax.servlet.ServletConfig config)
          Refer to Servlet Javadoc This method is invoked by the Servlet container When the app-server starts.
 void process()
          This method starts the Crontab and lets the system Continue without wasting more resources.
 void ShutdownHook()
          This method seths 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, doGet, doHead, doOptions, doPost, doPut, doTrace, getAllDeclaredMethods, getLastModified, maybeSetLastModified, 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, registerNatives, toString, wait, wait, wait
 

Field Detail

crontab

private org.jcrontab.Crontab crontab
Constructor Detail

LoadCrontabServlet

public LoadCrontabServlet()
Method Detail

init

public void init(javax.servlet.ServletConfig config)
          throws javax.servlet.ServletException
Refer to Servlet Javadoc This method is invoked by the Servlet container When the app-server starts.
Overrides:
init in class javax.servlet.GenericServlet
Parameters:
config - The ServletConfig
Throws:
javax.servlet.ServletException -  

createPropertiesStream

protected java.io.InputStream createPropertiesStream(java.lang.String name)
                                              throws java.io.IOException

process

public void process()
This method starts the Crontab and lets the system Continue without wasting more resources. This method can receive the config File as a variable in web.xml

ShutdownHook

public void ShutdownHook()
                  throws java.lang.Exception
This method seths a ShutdownHook to the system This traps the CTRL+C or kill signal and shutdows Correctly the system.
Throws:
java.lang.Exception -  

destroy

public void destroy()
Overrides:
destroy in class javax.servlet.GenericServlet

doStop

public void doStop()