|
||||||||||
| 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
com.webhydra.slug.Slug
public class Slug
Sluggish processes interface servlet.
Process requests for SuggishProcess(es)' ProcessStatus
The following calling convention utilizes Serlet's Path Info and Request's parameters:
/<ACTION>[/<TRANSLATOR>]/?[rn=<RUNNER>&]pid=<PID>[;&url=<URL>]
ProcessStatus of spcified
SuggishProcess;SuggishProcess from
it from its ISlugRunner Active Proces Llist Table and reports
its ProcessStatus;SuggishProcess and removes
it from its ISlugRunner Active Proces Llist Table and reports
its ProcessStatus;IProcessStatusTranslator as
listed in the translator conficuration section of Slug's config. If it is
not provided the the default translator (the first in provided configuration)
will be used.
ISlugRunner as
listed in the runners conficuration section of Slug's config. If not provided
the default one (the first in provided configuration) will be used.
SluggishProcess instance as
is returned from the ISlugRunner.add(SluggishProcess,String) call.
status action is requested;
cancel or consume actions are called;
status/xsd/?rn=unlimited&pid=1140468189:1&url=/myapp/done?pid=1140468189:1
ISlugRunner.add(SluggishProcess,String),
SluggishProcess,
ISlugConfigParser,
PropertiesConfigParser,
Serialized Form| Field Summary | |
|---|---|
static java.lang.String |
DIST_VERSION
CVS version of the distribution. |
static java.lang.String |
NAME
Name of the servlet |
static java.lang.String |
PARAM_NAME_CONFIG
Name of the configuration file name parameter. |
static java.lang.String |
PARAM_NAME_PARSER
Name of the configuration parser class name parameter. |
static java.lang.String |
PARAM_PID
Mandatory request parameter with PID value |
static java.lang.String |
PARAM_REFIRECT_URL
Parameter for redirection |
static java.lang.String |
PARAM_RUNNER_NAME
Optinal runner name parameter. |
static java.lang.String |
PATH_CANCEL
Path Info constant for the process cancelation |
static java.lang.String |
PATH_CONSUME
Path Info constant for the process consompsion |
static java.lang.String |
PATH_STATUS
Path Info constant for the status processor |
| Constructor Summary | |
|---|---|
Slug()
|
|
| Method Summary | |
|---|---|
void |
destroy()
Overrides the default implelentation. |
protected void |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Handles the HTTP GET method. |
protected void |
doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Handles the HTTP POST method. |
java.lang.String |
getServletInfo()
Returns a short description of the servlet. |
protected com.webhydra.slug.SlugConfig |
getSlugConfig()
Provides convinient acess to the cfg property. |
void |
init()
Overrides the default implementation from javax.servlet.GenericServlet |
protected void |
processRequest(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Processes requests for both HTTP GET and POST methods. |
protected void |
reportStatus(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
ProcessStatus ps,
IProcessStatusTranslator translator)
Report process' status |
protected void |
setBody(javax.servlet.http.HttpServletResponse response,
java.lang.String body,
java.lang.String contentType)
Prints provided body to the browser. |
| 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, 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 DIST_VERSION
public static final java.lang.String NAME
public static final java.lang.String PARAM_NAME_CONFIG
ISlugConfigParser implementation.
public static final java.lang.String PARAM_NAME_PARSER
ISlugConfigParser
implementation.
public static final java.lang.String PATH_STATUS
public static final java.lang.String PATH_CONSUME
public static final java.lang.String PATH_CANCEL
public static final java.lang.String PARAM_PID
PID value
public static final java.lang.String PARAM_RUNNER_NAME
public static final java.lang.String PARAM_REFIRECT_URL
| Constructor Detail |
|---|
public Slug()
| Method Detail |
|---|
public java.lang.String getServletInfo()
getServletInfo in interface javax.servlet.ServletgetServletInfo in class javax.servlet.GenericServlet
protected void processRequest(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException,
java.io.IOException
GET and POST methods.
runner or translator
cannot be found or requested action is not supportedPID is missing or is empty.PID can not be found and no redirect
URL is provided
request - servlet requestresponse - servlet response
javax.servlet.ServletException
java.io.IOException
protected void setBody(javax.servlet.http.HttpServletResponse response,
java.lang.String body,
java.lang.String contentType)
throws java.io.IOException
response - current HTTP response.body - HTML page to send to the browser.contentType - response content type.
java.io.IOException
protected void reportStatus(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
ProcessStatus ps,
IProcessStatusTranslator translator)
throws javax.servlet.ServletException,
java.io.IOException
request - servlet requestresponse - servlet responseps - status of current processtranslator - ProcessStarusTranslator instance.
javax.servlet.ServletException
java.io.IOException
protected void doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException,
java.io.IOException
GET method.
doGet in class javax.servlet.http.HttpServletrequest - servlet requestresponse - servlet response
javax.servlet.ServletException
java.io.IOException
protected void doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException,
java.io.IOException
POST method.
doPost in class javax.servlet.http.HttpServletrequest - servlet requestresponse - servlet response
javax.servlet.ServletException
java.io.IOException
public void init()
throws javax.servlet.ServletException
javax.servlet.GenericServlet
init in class javax.servlet.GenericServletjavax.servlet.ServletException - when important parameters are missing.protected com.webhydra.slug.SlugConfig getSlugConfig()
public void destroy()
ISlugRunners and releases all
IProcessStatusTranslators.
destroy in interface javax.servlet.Servletdestroy in class javax.servlet.GenericServletISlugService.release(),
ISlugService.release(),
ISlugService.release()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||