Package org.glassfish.grizzly.http.ajp
Class AjpAddOn
java.lang.Object
org.glassfish.grizzly.http.ajp.AjpAddOn
- All Implemented Interfaces:
AddOn
Ajp
AddOn for the HttpServer.
The addon searches for HttpCodecFilter occurrence in the passed FilterChainBuilder, removes it and
adds 2 filters: AjpMessageFilter and AjpHandlerFilter on its place.- Author:
- Alexey Stashok
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidConstruct AjpAddOnvoidconfigure(Properties properties) Configure Ajp Filter using properties.protected AjpHandlerFilterprotected AjpMessageFilterIf not null, only requests from workers with this secret keyword will be accepted.booleanIf set to true, the authentication will be done in Grizzly.voidsetup(NetworkListener networkListener, FilterChainBuilder builder) The method, which will be invoked byHttpServerin order to initialize the AddOn on the passedNetworkListener.
-
Constructor Details
-
AjpAddOn
public AjpAddOn()
-
-
Method Details
-
configure
Construct AjpAddOn- Parameters:
isTomcatAuthentication- if true, the authentication will be done in Grizzly. Otherwise, the authenticated principal will be propagated from the native webserver and used for authorization in Grizzly.secret- if not null, only requests from workers with this secret keyword will be accepted, or null otherwise.
-
configure
Configure Ajp Filter using properties. We support following properties: request.useSecret, request.secret, tomcatAuthentication.- Parameters:
properties-
-
isTomcatAuthentication
public boolean isTomcatAuthentication()If set to true, the authentication will be done in Grizzly. Otherwise, the authenticated principal will be propagated from the native webserver and used for authorization in Grizzly. The default value is true.- Returns:
- true, if the authentication will be done in Grizzly. Otherwise, the authenticated principal will be propagated from the native webserver and used for authorization in Grizzly.
-
getSecret
If not null, only requests from workers with this secret keyword will be accepted.- Returns:
- not null, if only requests from workers with this secret keyword will be accepted, or null otherwise.
-
setup
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.
-
createAjpHandlerFilter
-
createAjpMessageFilter
-