rename of StaticHttpContentFactory
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
This commit is contained in:
parent
abc40afd89
commit
9270e62f78
|
@ -17,17 +17,17 @@ import java.io.IOException;
|
|||
|
||||
import org.eclipse.jetty.util.resource.Resource;
|
||||
|
||||
public class StaticContentFactory implements HttpContent.Factory
|
||||
public class StaticHttpContentFactory implements HttpContent.Factory
|
||||
{
|
||||
private final HttpContent.Factory _factory;
|
||||
private Resource _styleSheet;
|
||||
|
||||
public StaticContentFactory(HttpContent.Factory factory)
|
||||
public StaticHttpContentFactory(HttpContent.Factory factory)
|
||||
{
|
||||
_factory = factory;
|
||||
}
|
||||
|
||||
public StaticContentFactory(HttpContent.Factory factory, Resource styleSheet)
|
||||
public StaticHttpContentFactory(HttpContent.Factory factory, Resource styleSheet)
|
||||
{
|
||||
_factory = factory;
|
||||
_styleSheet = styleSheet;
|
|
@ -23,7 +23,7 @@ import org.eclipse.jetty.http.content.FileMappingHttpContentFactory;
|
|||
import org.eclipse.jetty.http.content.HttpContent;
|
||||
import org.eclipse.jetty.http.content.PreCompressedHttpContentFactory;
|
||||
import org.eclipse.jetty.http.content.ResourceHttpContentFactory;
|
||||
import org.eclipse.jetty.http.content.StaticContentFactory;
|
||||
import org.eclipse.jetty.http.content.StaticHttpContentFactory;
|
||||
import org.eclipse.jetty.http.content.ValidatingCachingHttpContentFactory;
|
||||
import org.eclipse.jetty.io.ByteBufferPool;
|
||||
import org.eclipse.jetty.io.NoopByteBufferPool;
|
||||
|
@ -106,7 +106,7 @@ public class ResourceHandler extends Handler.Wrapper
|
|||
{
|
||||
HttpContent.Factory contentFactory = new ResourceHttpContentFactory(ResourceFactory.of(_resourceBase), _mimeTypes);
|
||||
contentFactory = new FileMappingHttpContentFactory(contentFactory);
|
||||
contentFactory = new StaticContentFactory(contentFactory, getStyleSheet());
|
||||
contentFactory = new StaticHttpContentFactory(contentFactory, getStyleSheet());
|
||||
contentFactory = new PreCompressedHttpContentFactory(contentFactory, _resourceService.getPrecompressedFormats());
|
||||
contentFactory = new ValidatingCachingHttpContentFactory(contentFactory, Duration.ofSeconds(1).toMillis(), _byteBufferPool);
|
||||
return contentFactory;
|
||||
|
|
|
@ -57,7 +57,7 @@ import org.eclipse.jetty.http.content.FileMappingHttpContentFactory;
|
|||
import org.eclipse.jetty.http.content.HttpContent;
|
||||
import org.eclipse.jetty.http.content.PreCompressedHttpContentFactory;
|
||||
import org.eclipse.jetty.http.content.ResourceHttpContentFactory;
|
||||
import org.eclipse.jetty.http.content.StaticContentFactory;
|
||||
import org.eclipse.jetty.http.content.StaticHttpContentFactory;
|
||||
import org.eclipse.jetty.http.content.ValidatingCachingHttpContentFactory;
|
||||
import org.eclipse.jetty.io.ByteBufferInputStream;
|
||||
import org.eclipse.jetty.io.ByteBufferPool;
|
||||
|
@ -158,7 +158,7 @@ public class DefaultServlet extends HttpServlet
|
|||
if (getInitBoolean("useFileMappedBuffer", false))
|
||||
contentFactory = new FileMappingHttpContentFactory(contentFactory);
|
||||
|
||||
contentFactory = new StaticContentFactory(contentFactory, styleSheet);
|
||||
contentFactory = new StaticHttpContentFactory(contentFactory, styleSheet);
|
||||
contentFactory = new PreCompressedHttpContentFactory(contentFactory, precompressedFormats);
|
||||
|
||||
int maxCacheSize = getInitInt("maxCacheSize", -2);
|
||||
|
|
|
@ -33,7 +33,7 @@ import org.eclipse.jetty.http.content.FileMappingHttpContentFactory;
|
|||
import org.eclipse.jetty.http.content.HttpContent;
|
||||
import org.eclipse.jetty.http.content.PreCompressedHttpContentFactory;
|
||||
import org.eclipse.jetty.http.content.ResourceHttpContentFactory;
|
||||
import org.eclipse.jetty.http.content.StaticContentFactory;
|
||||
import org.eclipse.jetty.http.content.StaticHttpContentFactory;
|
||||
import org.eclipse.jetty.http.content.ValidatingCachingHttpContentFactory;
|
||||
import org.eclipse.jetty.io.ByteBufferPool;
|
||||
import org.eclipse.jetty.io.NoopByteBufferPool;
|
||||
|
@ -134,7 +134,7 @@ public class ResourceHandler extends HandlerWrapper implements ResourceFactory,
|
|||
{
|
||||
HttpContent.Factory contentFactory = new ResourceHttpContentFactory(this, _mimeTypes);
|
||||
contentFactory = new FileMappingHttpContentFactory(contentFactory);
|
||||
contentFactory = new StaticContentFactory(contentFactory, getStyleSheet());
|
||||
contentFactory = new StaticHttpContentFactory(contentFactory, getStyleSheet());
|
||||
contentFactory = new PreCompressedHttpContentFactory(contentFactory, _resourceService.getPrecompressedFormats());
|
||||
contentFactory = new ValidatingCachingHttpContentFactory(contentFactory, Duration.ofSeconds(1).toMillis(), _byteBufferPool);
|
||||
return contentFactory;
|
||||
|
|
|
@ -39,7 +39,7 @@ import org.eclipse.jetty.http.content.FileMappingHttpContentFactory;
|
|||
import org.eclipse.jetty.http.content.HttpContent;
|
||||
import org.eclipse.jetty.http.content.PreCompressedHttpContentFactory;
|
||||
import org.eclipse.jetty.http.content.ResourceHttpContentFactory;
|
||||
import org.eclipse.jetty.http.content.StaticContentFactory;
|
||||
import org.eclipse.jetty.http.content.StaticHttpContentFactory;
|
||||
import org.eclipse.jetty.http.content.ValidatingCachingHttpContentFactory;
|
||||
import org.eclipse.jetty.io.ByteBufferPool;
|
||||
import org.eclipse.jetty.io.NoopByteBufferPool;
|
||||
|
@ -253,7 +253,7 @@ public class DefaultServlet extends HttpServlet implements ResourceFactory, Welc
|
|||
contentFactory = new ResourceHttpContentFactory(this, _mimeTypes);
|
||||
if (_useFileMappedBuffer)
|
||||
contentFactory = new FileMappingHttpContentFactory(contentFactory);
|
||||
contentFactory = new StaticContentFactory(contentFactory, _styleSheet);
|
||||
contentFactory = new StaticHttpContentFactory(contentFactory, _styleSheet);
|
||||
contentFactory = new PreCompressedHttpContentFactory(contentFactory, _resourceService.getPrecompressedFormats());
|
||||
|
||||
int maxCacheSize = getInitInt("maxCacheSize", -2);
|
||||
|
|
Loading…
Reference in New Issue