Class PushCacheFilter
- java.lang.Object
-
- org.eclipse.jetty.servlets.PushCacheFilter
-
- All Implemented Interfaces:
javax.servlet.Filter
@Deprecated @ManagedObject("Push cache based on the HTTP \'Referer\' header") public class PushCacheFilter extends java.lang.Object implements javax.servlet.Filter
Deprecated.no replacement for this deprecated http featureA filter that builds a cache of secondary resources associated to primary resources.
A typical request for a primary resource such as
index.htmlis immediately followed by a number of requests for secondary resources. Secondary resource requests will have aRefererHTTP header that points toindex.html, which is used to associate the secondary resource to the primary resource.Only secondary resources that are requested within a (small) time period from the request of the primary resource are associated with the primary resource.
This allows to build a cache of secondary resources associated with primary resources. When a request for a primary resource arrives, associated secondary resources are pushed to the client, unless the request carries
If-xxxheader that hint that the client has the resources in its cache.If the init param useQueryInKey is set, then the query string is used as as part of the key to identify a resource
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classPushCacheFilter.PrimaryResourceDeprecated.
-
Field Summary
Fields Modifier and Type Field Description private long_associatePeriodDeprecated.private java.util.concurrent.ConcurrentMap<java.lang.String,PushCacheFilter.PrimaryResource>_cacheDeprecated.private java.util.Set<java.lang.String>_hostsDeprecated.private int_maxAssociationsDeprecated.private java.util.Set<java.lang.Integer>_portsDeprecated.private long_renewDeprecated.private boolean_useQueryInKeyDeprecated.private static LoggerLOGDeprecated.
-
Constructor Summary
Constructors Constructor Description PushCacheFilter()Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidclearPushCache()Deprecated.voiddestroy()Deprecated.voiddoFilter(javax.servlet.ServletRequest req, javax.servlet.ServletResponse resp, javax.servlet.FilterChain chain)Deprecated.java.util.Map<java.lang.String,java.lang.String>getPushCache()Deprecated.voidinit(javax.servlet.FilterConfig config)Deprecated.voidrenewPushCache()Deprecated.
-
-
-
Field Detail
-
LOG
private static final Logger LOG
Deprecated.
-
_ports
private final java.util.Set<java.lang.Integer> _ports
Deprecated.
-
_hosts
private final java.util.Set<java.lang.String> _hosts
Deprecated.
-
_cache
private final java.util.concurrent.ConcurrentMap<java.lang.String,PushCacheFilter.PrimaryResource> _cache
Deprecated.
-
_associatePeriod
private long _associatePeriod
Deprecated.
-
_maxAssociations
private int _maxAssociations
Deprecated.
-
_renew
private long _renew
Deprecated.
-
_useQueryInKey
private boolean _useQueryInKey
Deprecated.
-
-
Method Detail
-
init
public void init(javax.servlet.FilterConfig config) throws javax.servlet.ServletExceptionDeprecated.- Specified by:
initin interfacejavax.servlet.Filter- Throws:
javax.servlet.ServletException
-
doFilter
public void doFilter(javax.servlet.ServletRequest req, javax.servlet.ServletResponse resp, javax.servlet.FilterChain chain) throws java.io.IOException, javax.servlet.ServletExceptionDeprecated.- Specified by:
doFilterin interfacejavax.servlet.Filter- Throws:
java.io.IOExceptionjavax.servlet.ServletException
-
destroy
public void destroy()
Deprecated.- Specified by:
destroyin interfacejavax.servlet.Filter
-
getPushCache
@ManagedAttribute("The push cache contents") public java.util.Map<java.lang.String,java.lang.String> getPushCache()
Deprecated.
-
renewPushCache
@ManagedOperation(value="Renews the push cache contents", impact="ACTION") public void renewPushCache()
Deprecated.
-
clearPushCache
@ManagedOperation(value="Clears the push cache contents", impact="ACTION") public void clearPushCache()
Deprecated.
-
-