Class ServerPushFilterFactory


  • public class ServerPushFilterFactory
    extends Object
    A factory for building HTTP/2 PushCacheFilter,

    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 Detail

      • ServerPushFilterFactory

        public ServerPushFilterFactory()
    • 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)
      • getRefererHosts

        @Nullable
        public List<String> getRefererHosts()
      • setRefererHosts

        public void setRefererHosts​(@Nullable
                                    List<String> refererHosts)
      • getRefererPorts

        @Nullable
        public List<Integer> getRefererPorts()
      • setRefererPorts

        public void setRefererPorts​(@Nullable
                                    List<Integer> refererPorts)
      • addFilter

        public void addFilter​(org.eclipse.jetty.servlet.ServletContextHandler handler)