java.lang.Object
org.eclipse.jetty.server.ResourceService
Abstract resource service, used by DefaultServlet and ResourceHandler
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleandoGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) org.eclipse.jetty.http.HttpFieldorg.eclipse.jetty.http.HttpContent.ContentFactoryintorg.eclipse.jetty.http.CompressedContentFormat[]booleanbooleanbooleanisEtags()protected booleanisGzippedContent(String path) booleanbooleanprotected voidnotFound(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) protected booleanpassConditionalHeaders(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.eclipse.jetty.http.HttpContent content) protected voidputHeaders(javax.servlet.http.HttpServletResponse response, org.eclipse.jetty.http.HttpContent content, long contentLength) protected booleansendData(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, boolean include, org.eclipse.jetty.http.HttpContent content, Enumeration<String> reqRanges) protected voidsendDirectory(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.eclipse.jetty.util.resource.Resource resource, String pathInContext) protected voidsendStatus(javax.servlet.http.HttpServletResponse response, int status, Supplier<String> etag) protected voidsendWelcome(org.eclipse.jetty.http.HttpContent content, String pathInContext, boolean endsWithSlash, boolean included, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) voidsetAcceptRanges(boolean acceptRanges) voidsetCacheControl(org.eclipse.jetty.http.HttpField cacheControl) voidsetContentFactory(org.eclipse.jetty.http.HttpContent.ContentFactory contentFactory) voidsetDirAllowed(boolean dirAllowed) voidsetEncodingCacheSize(int encodingCacheSize) voidsetEtags(boolean etags) voidsetGzipEquivalentFileExtensions(List<String> gzipEquivalentFileExtensions) voidsetPathInfoOnly(boolean pathInfoOnly) voidsetPrecompressedFormats(org.eclipse.jetty.http.CompressedContentFormat[] precompressedFormats) voidsetRedirectWelcome(boolean redirectWelcome) voidsetWelcomeFactory(ResourceService.WelcomeFactory welcomeFactory)
-
Constructor Details
-
ResourceService
public ResourceService()
-
-
Method Details
-
getContentFactory
public org.eclipse.jetty.http.HttpContent.ContentFactory getContentFactory() -
setContentFactory
public void setContentFactory(org.eclipse.jetty.http.HttpContent.ContentFactory contentFactory) -
getWelcomeFactory
-
setWelcomeFactory
-
isAcceptRanges
public boolean isAcceptRanges() -
setAcceptRanges
public void setAcceptRanges(boolean acceptRanges) -
isDirAllowed
public boolean isDirAllowed() -
setDirAllowed
public void setDirAllowed(boolean dirAllowed) -
isRedirectWelcome
public boolean isRedirectWelcome() -
setRedirectWelcome
public void setRedirectWelcome(boolean redirectWelcome) -
getPrecompressedFormats
public org.eclipse.jetty.http.CompressedContentFormat[] getPrecompressedFormats() -
setPrecompressedFormats
public void setPrecompressedFormats(org.eclipse.jetty.http.CompressedContentFormat[] precompressedFormats) -
setEncodingCacheSize
public void setEncodingCacheSize(int encodingCacheSize) -
getEncodingCacheSize
public int getEncodingCacheSize() -
isPathInfoOnly
public boolean isPathInfoOnly() -
setPathInfoOnly
public void setPathInfoOnly(boolean pathInfoOnly) -
isEtags
public boolean isEtags() -
setEtags
public void setEtags(boolean etags) -
getCacheControl
public org.eclipse.jetty.http.HttpField getCacheControl() -
setCacheControl
public void setCacheControl(org.eclipse.jetty.http.HttpField cacheControl) -
getGzipEquivalentFileExtensions
-
setGzipEquivalentFileExtensions
-
doGet
public boolean doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException - Throws:
javax.servlet.ServletExceptionIOException
-
sendWelcome
protected void sendWelcome(org.eclipse.jetty.http.HttpContent content, String pathInContext, boolean endsWithSlash, boolean included, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException - Throws:
javax.servlet.ServletExceptionIOException
-
isGzippedContent
-
notFound
protected void notFound(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException - Throws:
IOException
-
sendStatus
protected void sendStatus(javax.servlet.http.HttpServletResponse response, int status, Supplier<String> etag) throws IOException - Throws:
IOException
-
passConditionalHeaders
protected boolean passConditionalHeaders(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.eclipse.jetty.http.HttpContent content) throws IOException - Throws:
IOException
-
sendDirectory
protected void sendDirectory(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.eclipse.jetty.util.resource.Resource resource, String pathInContext) throws IOException - Throws:
IOException
-
sendData
protected boolean sendData(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, boolean include, org.eclipse.jetty.http.HttpContent content, Enumeration<String> reqRanges) throws IOException - Throws:
IOException
-
putHeaders
protected void putHeaders(javax.servlet.http.HttpServletResponse response, org.eclipse.jetty.http.HttpContent content, long contentLength)
-