Class HttpPipelineOptAddOn
java.lang.Object
org.glassfish.grizzly.http.server.util.HttpPipelineOptAddOn
- All Implemented Interfaces:
AddOn
The plugin, that optimizes processing of pipelined HTTP requests by buffering HTTP responses and then writing them as
one operation.
Please note, this addon is not thread-safe, so it can't be used with HTTP requests, that require asynchronous
processing.
- Author:
- Alexey Stashok
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs HttpPipelineOptAddOn.HttpPipelineOptAddOn(int maxBufferSize) Constructs HttpPipelineOptAddOn. -
Method Summary
Modifier and TypeMethodDescriptionvoidsetup(NetworkListener networkListener, org.glassfish.grizzly.filterchain.FilterChainBuilder builder) The method, which will be invoked byHttpServerin order to initialize the AddOn on the passedNetworkListener.
-
Constructor Details
-
HttpPipelineOptAddOn
public HttpPipelineOptAddOn()Constructs HttpPipelineOptAddOn. -
HttpPipelineOptAddOn
public HttpPipelineOptAddOn(int maxBufferSize) Constructs HttpPipelineOptAddOn.- Parameters:
maxBufferSize- the max number of response bytes to buffer before flush
-
-
Method Details
-
setup
public void setup(NetworkListener networkListener, org.glassfish.grizzly.filterchain.FilterChainBuilder builder) Description copied from interface:AddOnThe method, which will be invoked byHttpServerin order to initialize the AddOn on the passedNetworkListener. Most of the time the AddOn implementation will update the passedNetworkListener'sFilterChainBuilderby adding customFilter(s), which implement AddOn's logic.- Specified by:
setupin interfaceAddOn- Parameters:
networkListener- theNetworkListenerthe addon is being initialized on.builder- theFilterChainBuilder, representing theNetworkListenerlogic.
-