public abstract class DynamoServlet extends HttpServletService implements ParameterServlet
This is an HttpServlet implementation that is also a Nucleus service. In addition, this passes calls with DynamoHttpServletRequest/Response objects to a separate service method that should be implemented.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string
|
protected boolean |
mAllowCleanupRequest
Set to false to prevent request
cleanup code from being called.
|
protected java.util.Dictionary |
mParameters
Any parameters defined for this servlet
|
SERVLET_INFO_KEY
SERVICE_INFO_KEY
DEFAULT_LOG_TRACE_STATUS
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS
Constructor and Description |
---|
DynamoServlet() |
Modifier and Type | Method and Description |
---|---|
protected void |
doDelete(DynamoHttpServletRequest req,
DynamoHttpServletResponse res)
Default implementation of DELETE.
|
protected void |
doGet(DynamoHttpServletRequest req,
DynamoHttpServletResponse res)
Default implementation of GET.
|
protected void |
doPost(DynamoHttpServletRequest req,
DynamoHttpServletResponse res)
Default implementation of POST.
|
protected void |
doPut(DynamoHttpServletRequest req,
DynamoHttpServletResponse res)
Default implementation of PUT.
|
java.lang.Object |
getParameter(java.lang.String pName)
Return the specified parameters defined for this servlet
|
java.util.Dictionary |
getParameters()
Return any parameters defined for this servlet
|
javax.servlet.ServletContext |
getServletContext()
Returns this servlet's ServletContext
|
void |
init(javax.servlet.ServletConfig config)
Initializes the servlet.
|
void |
service(DynamoHttpServletRequest req,
DynamoHttpServletResponse res)
This method provides the default implementation of service,
by dispatching to conventionally named methods which begin
with "do".
|
void |
service(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
The service method
|
void |
service(javax.servlet.ServletRequest req,
javax.servlet.ServletResponse res)
The service method - go directly from a Servlet to a DynamoHttpServlet
for efficiency.
|
void |
setParameter(java.lang.String pName,
java.lang.Object pValue) |
destroy, getServletConfig, getServletInfo, setServletInfo
getAverageRequestHandlingTime, getHandledRequestCount, getRequestStartTime, getTotalRequestHandlingTime, isKeepingStatistics, notifyHandledRequest, resetStatistics, setKeepingStatistics
addLogListener, createAdminServlet, doStartService, doStopService, getAbsoluteName, getAdminServlet, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setAdminServletOutputStreamEncoding, setAdminServletUseServletOutputStream, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
public static java.lang.String CLASS_VERSION
protected boolean mAllowCleanupRequest
protected java.util.Dictionary mParameters
public void setParameter(java.lang.String pName, java.lang.Object pValue)
setParameter
in interface ParameterServlet
public java.util.Dictionary getParameters()
getParameters
in interface ParameterServlet
public java.lang.Object getParameter(java.lang.String pName)
getParameter
in interface ParameterServlet
public javax.servlet.ServletContext getServletContext()
public void init(javax.servlet.ServletConfig config) throws javax.servlet.ServletException
ServletService
init
in interface javax.servlet.Servlet
init
in class ServletService
javax.servlet.ServletException
- if a servlet exception has occurredpublic void service(javax.servlet.ServletRequest req, javax.servlet.ServletResponse res) throws javax.servlet.ServletException, java.io.IOException
service
in interface javax.servlet.Servlet
service
in class HttpServletService
req
- the servlet requestres
- the servlet responsejavax.servlet.ServletException
- if an error occurred while processing
the servlet requestjava.io.IOException
- if an error occurred while reading or writing
the servlet requestpublic void service(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) throws javax.servlet.ServletException, java.io.IOException
service
in class HttpServletService
req
- the servlet requestres
- the servlet responsejavax.servlet.ServletException
- if an error occurred while processing
the servlet requestjava.io.IOException
- if an error occurred while reading or writing
the servlet requestpublic void service(DynamoHttpServletRequest req, DynamoHttpServletResponse res) throws javax.servlet.ServletException, java.io.IOException
req
- the request to be processedres
- the response object for this requestjavax.servlet.ServletException
- an application specific error occurred
processing this requestjava.io.IOException
- an error occurred reading data from the request
or writing data to the response.protected void doGet(DynamoHttpServletRequest req, DynamoHttpServletResponse res) throws javax.servlet.ServletException, java.io.IOException
req
- the request to be processedres
- the response object for this requestjavax.servlet.ServletException
- an application specific error occurred
processing this requestjava.io.IOException
- an error occurred reading data from the request
or writing data to the response.protected void doPut(DynamoHttpServletRequest req, DynamoHttpServletResponse res) throws javax.servlet.ServletException, java.io.IOException
req
- the request to be processedres
- the response object for this requestjavax.servlet.ServletException
- an application specific error occurred
processing this requestjava.io.IOException
- an error occurred reading data from the request
or writing data to the response.protected void doDelete(DynamoHttpServletRequest req, DynamoHttpServletResponse res) throws javax.servlet.ServletException, java.io.IOException
req
- the request to be processedres
- the response object for this requestjavax.servlet.ServletException
- an application specific error occurred
processing this requestjava.io.IOException
- an error occurred reading data from the request
or writing data to the response.protected void doPost(DynamoHttpServletRequest req, DynamoHttpServletResponse res) throws javax.servlet.ServletException, java.io.IOException
req
- the request to be processedres
- the response object for this requestjavax.servlet.ServletException
- an application specific error occurred
processing this requestjava.io.IOException
- an error occurred reading data from the request
or writing data to the response.