Class PushCacheFilter
- All Implemented Interfaces:
javax.servlet.Filter
A filter that builds a cache of secondary resources associated to primary resources.
A typical request for a primary resource such as index.html
is immediately followed by a number of requests for secondary resources.
Secondary resource requests will have a Referer
HTTP header
that points to index.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-xxx
header 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 ClassesModifier and TypeClassDescriptionprivate static class
Deprecated. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate long
Deprecated.private final ConcurrentMap
<String, PushCacheFilter.PrimaryResource> Deprecated.Deprecated.private int
Deprecated.Deprecated.private long
Deprecated.private boolean
Deprecated.private static final Logger
Deprecated. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
LOG
Deprecated. -
_ports
Deprecated. -
_hosts
Deprecated. -
_cache
Deprecated. -
_associatePeriod
private long _associatePeriodDeprecated. -
_maxAssociations
private int _maxAssociationsDeprecated. -
_renew
private long _renewDeprecated. -
_useQueryInKey
private boolean _useQueryInKeyDeprecated.
-
-
Constructor Details
-
PushCacheFilter
public PushCacheFilter()Deprecated.
-
-
Method Details
-
init
public void init(javax.servlet.FilterConfig config) throws javax.servlet.ServletException Deprecated.- Specified by:
init
in interfacejavax.servlet.Filter
- Throws:
javax.servlet.ServletException
-
doFilter
public void doFilter(javax.servlet.ServletRequest req, javax.servlet.ServletResponse resp, javax.servlet.FilterChain chain) throws IOException, javax.servlet.ServletException Deprecated.- Specified by:
doFilter
in interfacejavax.servlet.Filter
- Throws:
IOException
javax.servlet.ServletException
-
destroy
public void destroy()Deprecated.- Specified by:
destroy
in interfacejavax.servlet.Filter
-
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.
-