public class RestPipelineServlet extends PipelineableServletImpl
http://www.ics.uci.edu/%7Efielding/pubs/dissertation/top.htm| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
BEAN_SERVLET_PATH |
static java.lang.String |
CLASS_VERSION
Class version string
|
static java.lang.String |
PARSED_URI |
static java.lang.String |
PATH_INFO |
static java.lang.String |
REPOSITORY_SERVLET_PATH |
static java.lang.String |
REST_CONTEXT_ROOT |
static java.lang.String |
SERVLET_PATH |
SERVICE_INFO_KEYDEFAULT_LOG_TRACE_STATUSDEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS| Constructor and Description |
|---|
RestPipelineServlet()
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
doStartService()
This is called after a Service has been created, placed into the
naming hierarchy, and initialized with its configured property
values.
|
java.lang.String |
getMethod(DynamoHttpServletRequest pRequest)
This method returns the http method type for the given request.
|
java.lang.String |
getRequiredServletPrefix()
Returns the required servlet prefix.
|
RestProcessor |
getRestProcessor() |
javax.transaction.TransactionManager |
getTransactionManager() |
boolean |
isEnsureTransaction()
Returns property EnsureTransaction, if false then no transaction management is performed
|
protected boolean |
isMatch(DynamoHttpServletRequest pRequest)
Does the URI start with the required prefix defined by
getRequiredServletPrefix() |
protected boolean |
isTransactionMarkedAsRollback()
Returns true if the transaction associated with the current thread is marked for rollback, false otherwise
|
protected void |
postCommitTransaction(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
This method is called after the transaction is committed.
|
protected void |
postCreateTransaction(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
This method is called after the transaction is created.
|
protected void |
preCommitTransaction(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
This method is called before the transaction is committed.
|
protected void |
preCreateTransaction(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
This method is called before the transaction is created.
|
void |
service(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Override the service() method and call serviceRESTRequest().
|
void |
serviceRESTRequest(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
This is the method which determines the type of request made and hands it off to one of the handle methods
in the RestProcessor.
|
void |
setEnsureTransaction(boolean pEnsureTransaction)
Sets property EnsureTransaction
|
void |
setRequiredServletPrefix(java.lang.String pRequiredServletPrefix)
Sets the required servletPrefix string
|
void |
setRestProcessor(RestProcessor pRestProcessor) |
void |
setTransactionManager(javax.transaction.TransactionManager pTransactionManager) |
createAdminServlet, destroy, getAdminServlet, getNextServlet, getServletConfig, getServletInfo, init, isUsePathInfo, passRequest, passRequest, service, service, setNextServlet, setServletInfo, setUsePathInfogetAverageRequestHandlingTime, getHandledRequestCount, getRequestStartTime, getTotalRequestHandlingTime, isKeepingStatistics, notifyHandledRequest, resetStatistics, setKeepingStatisticsaddLogListener, doStopService, getAbsoluteName, 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, stopServicevlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarningpublic static java.lang.String CLASS_VERSION
public static final java.lang.String REPOSITORY_SERVLET_PATH
public static final java.lang.String BEAN_SERVLET_PATH
public static final java.lang.String REST_CONTEXT_ROOT
public static final java.lang.String PARSED_URI
public static final java.lang.String SERVLET_PATH
public static final java.lang.String PATH_INFO
public RestProcessor getRestProcessor()
RestProcessorpublic void setRestProcessor(RestProcessor pRestProcessor)
pRestProcessor - the restProcessor to set. The restProcessor is a reference to a nucleus component which implements the RestProcessor
interface for handling REST requests.pRestProcessor - the instance of a RestProcessor to setRestProcessorpublic java.lang.String getRequiredServletPrefix()
public void setRequiredServletPrefix(java.lang.String pRequiredServletPrefix)
pRequiredServletPrefix - the requiredServletPrefix to setpublic javax.transaction.TransactionManager getTransactionManager()
public void setTransactionManager(javax.transaction.TransactionManager pTransactionManager)
pTransactionManager - the transactionManager to setpublic void setEnsureTransaction(boolean pEnsureTransaction)
public boolean isEnsureTransaction()
public void doStartService()
throws ServiceException
GenericServicedoStartService in class GenericServiceServiceException - if the Service had a problem starting upprotected void preCreateTransaction(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws RestException
pRequest - the servlet requestpResponse - the servlet responseRestException - if an error occurs in the methodprotected void postCreateTransaction(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws RestException, java.io.IOException
pRequest - the servlet requestpResponse - the servlet responseRestException - if an error occurs in the methodjava.io.IOExceptionprotected void preCommitTransaction(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
pRequest - the servlet requestpResponse - the servlet responseprotected void postCommitTransaction(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
pRequest - the servlet requestpResponse - the servlet responsepublic void service(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws java.io.IOException, javax.servlet.ServletException
service in class PipelineableServletImplpRequest - the servlet requestpResponse - the servlet responsejava.io.IOException - if an input or output stream exception occursjavax.servlet.ServletException - if any other error occursserviceRESTRequest(DynamoHttpServletRequest, DynamoHttpServletResponse)protected boolean isTransactionMarkedAsRollback()
protected boolean isMatch(DynamoHttpServletRequest pRequest)
getRequiredServletPrefix()pRequest - the servlet requestpublic void serviceRESTRequest(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws RestException, java.io.IOException, javax.servlet.ServletException
pRequest - the servlet requestpResponse - the servlet responseRestException - if an error occurs processing the REST requestjava.io.IOException - if an input or output stream exception occursjavax.servlet.ServletException - if a general error occurspublic java.lang.String getMethod(DynamoHttpServletRequest pRequest)
pRequest - the servlet request