Package io.dropwizard.jetty
Class ServerPushFilterFactory
- java.lang.Object
-
- io.dropwizard.jetty.ServerPushFilterFactory
-
public class ServerPushFilterFactory extends Object
A factory for building HTTP/2PushCacheFilter
, Configuration Parameters:Name Default Description enabled
false If true, the filter will organize resources as primary resources (those referenced by the Referer header) and secondary resources (those that have the Referer header). Secondary resources that have been requested within a time window from the request of the primary resource will be associated with the it. The next time a client will request the primary resource, the server will send to the client the secondary resources along with the primary in a single response. associatePeriod
4 seconds The time window within which a request for a secondary resource will be associated to a primary resource. maxAssociations
16 The maximum number of secondary resources that may be associated to a primary resource. refererHosts
All hosts The list of referrer hosts for which the server push technology is supported. refererPorts
All ports The list of referrer ports for which the server push technology is supported.
-
-
Constructor Summary
Constructors Constructor Description ServerPushFilterFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addFilter(org.eclipse.jetty.servlet.ServletContextHandler handler)
Duration
getAssociatePeriod()
int
getMaxAssociations()
@Nullable List<String>
getRefererHosts()
@Nullable List<Integer>
getRefererPorts()
boolean
isEnabled()
void
setAssociatePeriod(Duration associatePeriod)
void
setEnabled(boolean enabled)
void
setMaxAssociations(int maxAssociations)
void
setRefererHosts(@Nullable List<String> refererHosts)
void
setRefererPorts(@Nullable List<Integer> refererPorts)
-
-
-
Method Detail
-
isEnabled
public boolean isEnabled()
-
setEnabled
public void setEnabled(boolean enabled)
-
getAssociatePeriod
public Duration getAssociatePeriod()
-
setAssociatePeriod
public void setAssociatePeriod(Duration associatePeriod)
-
getMaxAssociations
public int getMaxAssociations()
-
setMaxAssociations
public void setMaxAssociations(int maxAssociations)
-
addFilter
public void addFilter(org.eclipse.jetty.servlet.ServletContextHandler handler)
-
-