| Modifier and Type | Field and Description |
|---|---|
| private DeflaterPool | |
| private int | |
| private final IncludeExclude | |
| private InflaterPool | |
| private final IncludeExclude | |
| private final IncludeExclude | |
| private int | |
| private final IncludeExclude | |
| private boolean | |
| private HttpField | |
| public static final int | |
| public static final int | |
| public static final String | |
| public static final String | |
| public static final String | |
| private static final Logger |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | addExcludedInflationPaths(String...
Path specs (as per servlet spec) to exclude. If a
ServletContext is available, the paths are relative to the context path,
otherwise they are absolute. pathspecs)For backward compatibility the pathspecs may be comma separated strings, but this will not be supported in future versions. Adds excluded Path Specs for request filtering on request inflation. |
| public void | addExcludedMethods(String...
The methods to exclude in compression methods)Add excluded to the HTTP methods filtering. |
| public void | addExcludedMimeTypes(String...
The mime types to exclude (without charset or other parameters). types)Adds excluded MIME types for response filtering. |
| public void | addExcludedPaths(String...
Path specs (as per servlet spec) to exclude. If a
ServletContext is available, the paths are relative to the context path,
otherwise they are absolute. pathspecs)For backward compatibility the pathspecs may be comma separated strings, but this will not be supported in future versions. Adds excluded Path Specs for request filtering. |
| public void | addIncludedInflationPaths(String...
Path specs (as per servlet spec) to include. If a
ServletContext is available, the paths are relative to the context path,
otherwise they are absolute pathspecs)Add included Path Specs for filtering on request inflation. |
| public void | addIncludedMethods(String...
The HTTP methods to include in compression. methods)Adds included HTTP Methods (eg: POST, PATCH, DELETE) for filtering. |
| public void | addIncludedMimeTypes(String...
The mime types to include (without charset or other parameters)
For backward compatibility the mimetypes may be comma separated strings, but this
will not be supported in future versions. types)Add included MIME types for response filtering |
| public void | addIncludedPaths(String...
Path specs (as per servlet spec) to include. If a
ServletContext is available, the paths are relative to the context path,
otherwise they are absolute pathspecs)Add included Path Specs for filtering. |
| protected void | doStart()
Overrides org. Starts the managed lifecycle beans in the order they were added. |
| protected void | doStop()
Overrides org. Stops the managed lifecycle beans in the reverse order they were added. |
| public CompressionPool | getDeflaterEntry(Request request, long contentLength)
Implements org.
|
| public DeflaterPool | |
| public String[] | Returns: the filter list of excluded Path SpecsGet the current filter list of excluded Path Specs for request inflation. |
| public String | Returns: the excluded filter list of HTTP methods in CSV formatGet the excluded filter list of HTTP methods in CSV format |
| public String[] | Returns: the filter list of excluded HTTP methodsGet the current filter list of excluded HTTP methods |
| public String[] | Returns: the filter list of excluded MIME typesGet the current filter list of excluded MIME types |
| public String[] | Returns: the filter list of excluded Path SpecsGet the current filter list of excluded Path Specs |
| public String[] | Returns: the filter list of included Path SpecsGet the current filter list of included Path Specs for request inflation. |
| public String | Returns: the included filter list of HTTP methods in CSV formatGet the included filter list of HTTP methods in CSV format |
| public String[] | Returns: the filter list of included HTTP methodsGet the current filter list of included HTTP Methods |
| public String[] | Returns: the filter list of included MIME typesGet the current filter list of included MIME types |
| public String[] | Returns: the filter list of included Path SpecsGet the current filter list of included Path Specs |
| public int | Returns: size in bytes of the buffer, or 0 for no inflation.Get the size (in bytes) of the |
| public InflaterPool | |
| public int | Returns: minimum response size (in bytes) that triggers compressionGet the minimum size, in bytes, that a response |
| public HttpField | |
| public boolean | handle(Request
the HTTP request to handle request, Response the HTTP response to handle response, Callback the callback to complete when the handling is complete callback)Overrides org. Implements org. Invoked to handle the passed HTTP request and response. |
| protected boolean | |
| public boolean | Returns: true if allowed, false otherwisethe MIME type to test mimetype)Implements org. Test if the provided MIME type is allowed based on the MIME type filters. |
| protected boolean | Returns: whether compressing is allowed for the given the paththe request uri requestURI)Test if the provided Request URI is allowed based on the Path Specs filters. |
| protected boolean | Returns: whether decompressing is allowed for the given the path.the request path in context pathInContext)Test if the provided Request URI is allowed to be inflated based on the Path Specs filters. |
| public boolean | |
| public void | |
| public void | setExcludedInflatePaths(String...
Path specs (as per servlet spec) to exclude from inflation. If a
ServletContext is available, the paths are relative to the context path,
otherwise they are absolute. pathspecs)Set the excluded filter list of Path specs (replacing any previously set) |
| public void | setExcludedMethodList(String
the list of methods, CSV format csvMethods)Set the excluded filter list of HTTP Methods (replacing any previously set) |
| public void | setExcludedMethods(String...
the HTTP methods to exclude methods)Set the excluded filter list of HTTP methods (replacing any previously set) |
| public void | setExcludedMimeTypes(String...
The mime types to exclude (without charset or other parameters) types)Set the excluded filter list of MIME types (replacing any previously set) |
| public void | setExcludedMimeTypesList(String
The list of mime types to exclude (without charset or other parameters), CSV format csvTypes)Set the excluded filter list of MIME types (replacing any previously set) |
| public void | setExcludedPaths(String...
Path specs (as per servlet spec) to exclude. If a
ServletContext is available, the paths are relative to the context path,
otherwise they are absolute. pathspecs)Set the excluded filter list of Path specs (replacing any previously set) |
| public void | setIncludedInflatePaths(String...
Path specs (as per servlet spec) to include for inflation. If a
ServletContext is available, the paths are relative to the context path,
otherwise they are absolute pathspecs)Set the included filter list of Path specs (replacing any previously set) |
| public void | setIncludedMethodList(String
the list of methods, CSV format csvMethods)Set the included filter list of HTTP Methods (replacing any previously set) |
| public void | setIncludedMethods(String...
The methods to include in compression methods)Set the included filter list of HTTP methods (replacing any previously set) |
| public void | setIncludedMimeTypes(String...
The mime types to include (without charset or other parameters) types)Set the included filter list of MIME types (replacing any previously set) |
| public void | setIncludedMimeTypesList(String
The list of mime types to include (without charset or other parameters), CSV format csvTypes)Set the included filter list of MIME types (replacing any previously set) |
| public void | setIncludedPaths(String...
Path specs (as per servlet spec) to include. If a
ServletContext is available, the paths are relative to the context path,
otherwise they are absolute pathspecs)Set the included filter list of Path specs (replacing any previously set) |
| public void | setInflateBufferSize(int
size in bytes of the buffer, or 0 for no inflation. size)Set the size (in bytes) of the |
| public void | |
| public void | setMinGzipSize(int
minimum response size in bytes (not allowed to be lower then minGzipSize)BREAK_EVEN_GZIP_SIZE)Set the minimum response size to trigger dynamic compression. |
| public void | setSyncFlush(boolean
True if syncFlush)Deflater#SYNC_FLUSH is used, else Deflater#NO_FLUSHSet the |
| public void | setVary(HttpField
The VARY field to use. It if is not an instance of vary)PreEncodedHttpField,
then it will be converted to one.
|
| public String | toString()
Overrides org. Returns a string representation of the object. |
| _deflaterPool | back to summary |
|---|---|
| private DeflaterPool _deflaterPool | |
| _inflateBufferSize | back to summary |
|---|---|
| private int _inflateBufferSize | |
| _inflatePaths | back to summary |
|---|---|
| private final IncludeExclude<String> _inflatePaths | |
| _inflaterPool | back to summary |
|---|---|
| private InflaterPool _inflaterPool | |
| _methods | back to summary |
|---|---|
| private final IncludeExclude<String> _methods | |
| _mimeTypes | back to summary |
|---|---|
| private final IncludeExclude<String> _mimeTypes | |
| _minGzipSize | back to summary |
|---|---|
| private int _minGzipSize | |
| _paths | back to summary |
|---|---|
| private final IncludeExclude<String> _paths | |
| _syncFlush | back to summary |
|---|---|
| private boolean _syncFlush | |
| _vary | back to summary |
|---|---|
| private HttpField _vary | |
| BREAK_EVEN_GZIP_SIZE | back to summary |
|---|---|
| public static final int BREAK_EVEN_GZIP_SIZE | |
| DEFAULT_MIN_GZIP_SIZE | back to summary |
|---|---|
| public static final int DEFAULT_MIN_GZIP_SIZE | |
| DEFLATE | back to summary |
|---|---|
| public static final String DEFLATE | |
| GZIP | back to summary |
|---|---|
| public static final String GZIP | |
| GZIP_HANDLER_ETAGS | back to summary |
|---|---|
| public static final String GZIP_HANDLER_ETAGS | |
| LOG | back to summary |
|---|---|
| private static final Logger LOG | |
| GzipHandler | back to summary |
|---|---|
| public GzipHandler() Instantiates a new GzipHandler. | |
| GzipHandler | back to summary |
|---|---|
| public GzipHandler(Handler handler) Instantiates a new GzipHandler.
| |
| addExcludedInflationPaths | back to summary |
|---|---|
| public void addExcludedInflationPaths(String... pathspecs) Adds excluded Path Specs for request filtering on request inflation.
There are 2 syntaxes supported, Servlet
Note inclusion takes precedence over exclude.
| |
| addExcludedMethods | back to summary |
|---|---|
| public void addExcludedMethods(String... methods) Add excluded to the HTTP methods filtering.
| |
| addExcludedMimeTypes | back to summary |
|---|---|
| public void addExcludedMimeTypes(String... types) Adds excluded MIME types for response filtering. Deprecation Warning: For backward compatibility the MIME types parameters may be comma separated strings, but this will not be supported in future versions of Jetty.
| |
| addExcludedPaths | back to summary |
|---|---|
| public void addExcludedPaths(String... pathspecs) Adds excluded Path Specs for request filtering.
There are 2 syntaxes supported, Servlet
Note inclusion takes precedence over exclude.
| |
| addIncludedInflationPaths | back to summary |
|---|---|
| public void addIncludedInflationPaths(String... pathspecs) Add included Path Specs for filtering on request inflation.
There are 2 syntaxes supported, Servlet
Note inclusion takes precedence over exclusion.
| |
| addIncludedMethods | back to summary |
|---|---|
| public void addIncludedMethods(String... methods) Adds included HTTP Methods (eg: POST, PATCH, DELETE) for filtering.
| |
| addIncludedMimeTypes | back to summary |
|---|---|
| public void addIncludedMimeTypes(String... types) Add included MIME types for response filtering
| |
| addIncludedPaths | back to summary |
|---|---|
| public void addIncludedPaths(String... pathspecs) Add included Path Specs for filtering.
There are 2 syntaxes supported, Servlet
Note inclusion takes precedence over exclusion.
| |
| doStart | back to summary |
|---|---|
| protected void doStart() throws Exception Overrides org. Doc from org. Starts the managed lifecycle beans in the order they were added.
| |
| doStop | back to summary |
|---|---|
| protected void doStop() throws Exception Overrides org. Doc from org. Stops the managed lifecycle beans in the reverse order they were added.
| |
| getDeflaterEntry | back to summary |
|---|---|
| public CompressionPool Implements org.
| |
| getDeflaterPool | back to summary |
|---|---|
| public DeflaterPool getDeflaterPool() Get the DeflaterPool being used. The default value of this is null before starting, but after starting if it is null it will be set to the default DeflaterPool which is stored as a bean on the server.
| |
| getExcludedInflationPaths | back to summary |
|---|---|
| public String[] getExcludedInflationPaths() Get the current filter list of excluded Path Specs for request inflation.
| |
| getExcludedMethodList | back to summary |
|---|---|
| public String getExcludedMethodList() Get the excluded filter list of HTTP methods in CSV format
| |
| getExcludedMethods | back to summary |
|---|---|
| public String[] getExcludedMethods() Get the current filter list of excluded HTTP methods
| |
| getExcludedMimeTypes | back to summary |
|---|---|
| public String[] getExcludedMimeTypes() Get the current filter list of excluded MIME types
| |
| getExcludedPaths | back to summary |
|---|---|
| public String[] getExcludedPaths() Get the current filter list of excluded Path Specs
| |
| getIncludedInflationPaths | back to summary |
|---|---|
| public String[] getIncludedInflationPaths() Get the current filter list of included Path Specs for request inflation.
| |
| getIncludedMethodList | back to summary |
|---|---|
| public String getIncludedMethodList() Get the included filter list of HTTP methods in CSV format
| |
| getIncludedMethods | back to summary |
|---|---|
| public String[] getIncludedMethods() Get the current filter list of included HTTP Methods
| |
| getIncludedMimeTypes | back to summary |
|---|---|
| public String[] getIncludedMimeTypes() Get the current filter list of included MIME types
| |
| getIncludedPaths | back to summary |
|---|---|
| public String[] getIncludedPaths() Get the current filter list of included Path Specs
| |
| getInflateBufferSize | back to summary |
|---|---|
| public int getInflateBufferSize() Get the size (in bytes) of the
| |
| getInflaterPool | back to summary |
|---|---|
| public InflaterPool getInflaterPool() Get the InflaterPool being used. The default value of this is null before starting, but after starting if it is null it will be set to the default InflaterPool which is stored as a bean on the server.
| |
| getMinGzipSize | back to summary |
|---|---|
| public int getMinGzipSize() Get the minimum size, in bytes, that a response
| |
| getVary | back to summary |
|---|---|
public HttpField getVary()
| |
| handle | back to summary |
|---|---|
| public boolean handle(Request request, Response response, Callback callback) throws Exception Overrides org. Implements org. Doc from org. Invoked to handle the passed HTTP request and response. The request is accepted by returning true, then handling must be concluded by completing the passed callback. The handling may be asynchronous, i.e. this method may return true and complete the given callback later, possibly from a different thread. If this method returns false, then the callback must not be invoked and any mutation on the response reversed. Exceptions thrown by this method may be subsequently handled by an error The simplest implementation is:
public boolean handle(Request request, Response response, Callback callback)
{
callback.succeeded();
return true;
}
A HelloWorld implementation is:
public boolean handle(Request request, Response response, Callback callback)
{
response.write(true, ByteBuffer.wrap("Hello World\n".getBytes(StandardCharsets.UTF_8)), callback);
return true;
}
| |
| isMimeTypeDeflatable | back to summary |
|---|---|
| protected boolean isMimeTypeDeflatable(MimeTypes mimeTypes, String requestURI) | |
| isMimeTypeDeflatable | back to summary |
|---|---|
| public boolean isMimeTypeDeflatable(String mimetype) Implements org. Test if the provided MIME type is allowed based on the MIME type filters. | |
| isPathDeflatable | back to summary |
|---|---|
| protected boolean isPathDeflatable(String requestURI) Test if the provided Request URI is allowed based on the Path Specs filters.
| |
| isPathInflatable | back to summary |
|---|---|
| protected boolean isPathInflatable(String pathInContext) Test if the provided Request URI is allowed to be inflated based on the Path Specs filters.
| |
| isSyncFlush | back to summary |
|---|---|
| public boolean isSyncFlush() Is the
| |
| setDeflaterPool | back to summary |
|---|---|
| public void setDeflaterPool(DeflaterPool deflaterPool) Set the DeflaterPool to be used. This should be called before starting. If this value is null when starting the default pool will be used from the server.
| |
| setExcludedInflatePaths | back to summary |
|---|---|
| public void setExcludedInflatePaths(String... pathspecs) Set the excluded filter list of Path specs (replacing any previously set)
| |
| setExcludedMethodList | back to summary |
|---|---|
| public void setExcludedMethodList(String csvMethods) Set the excluded filter list of HTTP Methods (replacing any previously set)
| |
| setExcludedMethods | back to summary |
|---|---|
| public void setExcludedMethods(String... methods) Set the excluded filter list of HTTP methods (replacing any previously set)
| |
| setExcludedMimeTypes | back to summary |
|---|---|
| public void setExcludedMimeTypes(String... types) Set the excluded filter list of MIME types (replacing any previously set)
| |
| setExcludedMimeTypesList | back to summary |
|---|---|
| public void setExcludedMimeTypesList(String csvTypes) Set the excluded filter list of MIME types (replacing any previously set)
| |
| setExcludedPaths | back to summary |
|---|---|
| public void setExcludedPaths(String... pathspecs) Set the excluded filter list of Path specs (replacing any previously set)
| |
| setIncludedInflatePaths | back to summary |
|---|---|
| public void setIncludedInflatePaths(String... pathspecs) Set the included filter list of Path specs (replacing any previously set)
| |
| setIncludedMethodList | back to summary |
|---|---|
| public void setIncludedMethodList(String csvMethods) Set the included filter list of HTTP Methods (replacing any previously set)
| |
| setIncludedMethods | back to summary |
|---|---|
| public void setIncludedMethods(String... methods) Set the included filter list of HTTP methods (replacing any previously set)
| |
| setIncludedMimeTypes | back to summary |
|---|---|
| public void setIncludedMimeTypes(String... types) Set the included filter list of MIME types (replacing any previously set)
| |
| setIncludedMimeTypesList | back to summary |
|---|---|
| public void setIncludedMimeTypesList(String csvTypes) Set the included filter list of MIME types (replacing any previously set)
| |
| setIncludedPaths | back to summary |
|---|---|
| public void setIncludedPaths(String... pathspecs) Set the included filter list of Path specs (replacing any previously set)
| |
| setInflateBufferSize | back to summary |
|---|---|
| public void setInflateBufferSize(int size) Set the size (in bytes) of the
| |
| setInflaterPool | back to summary |
|---|---|
| public void setInflaterPool(InflaterPool inflaterPool) Set the InflaterPool to be used. This should be called before starting. If this value is null when starting the default pool will be used from the server.
| |
| setMinGzipSize | back to summary |
|---|---|
| public void setMinGzipSize(int minGzipSize) Set the minimum response size to trigger dynamic compression.
Sizes below
| |
| setSyncFlush | back to summary |
|---|---|
| public void setSyncFlush(boolean syncFlush) Set the
| |
| setVary | back to summary |
|---|---|
public void setVary(HttpField vary)
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides org. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |