public class MimeTyperPipelineServlet extends PipelineableServletImpl
This pipeline servlet will add an attribute factory for the attribute MimeTyperPipelineServlet.ATTRIBUTE_NAME. The first time this attribute is accessed, the request's mime-type will be calculated and added as an attribute. The mime-type is determined from the pathTranslated property of the request. If pathTranslated is null, then the mime-type is determined by the pathInfo of the request.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ATTRIBUTE_NAME
The name of the attribute holding the mime type
|
static java.lang.String |
CLASS_VERSION
Class version string
|
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 |
---|
MimeTyperPipelineServlet()
Constructs a new MimeTyperPipelineServlet
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getMimeType(DynamoHttpServletRequest pRequest)
Returns the mime type of the given request
|
MimeTyper |
getMimeTyper()
Returns the MimeTyper used to determine the mime type of a
request.
|
void |
service(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Services a DynamoHttpServletRequest/Response pair
|
void |
setMimeTyper(MimeTyper pMimeTyper)
Sets the MimeTyper used to determine the mime type of a request.
|
createAdminServlet, destroy, getAdminServlet, getNextServlet, getServletConfig, getServletInfo, init, isUsePathInfo, passRequest, passRequest, service, service, setNextServlet, setServletInfo, setUsePathInfo
getAverageRequestHandlingTime, getHandledRequestCount, getRequestStartTime, getTotalRequestHandlingTime, isKeepingStatistics, notifyHandledRequest, resetStatistics, setKeepingStatistics
addLogListener, doStartService, 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, stopService, toString
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
public static final java.lang.String ATTRIBUTE_NAME
public MimeTyperPipelineServlet()
public MimeTyper getMimeTyper()
public void setMimeTyper(MimeTyper pMimeTyper)
public java.lang.String getMimeType(DynamoHttpServletRequest pRequest)
public void service(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws java.io.IOException, javax.servlet.ServletException
service
in class PipelineableServletImpl
javax.servlet.ServletException
- if an error occurred while processing
the servlet requestjava.io.IOException
- if an error occurred while reading or writing
the servlet request