Class AjpAddOn

java.lang.Object
org.glassfish.grizzly.http.ajp.AjpAddOn
All Implemented Interfaces:
org.glassfish.grizzly.http.server.AddOn

public class AjpAddOn extends Object implements org.glassfish.grizzly.http.server.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 Details

    • AjpAddOn

      public AjpAddOn()
  • Method Details

    • configure

      public void configure(boolean isTomcatAuthentication, String secret)
      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

      public void configure(Properties properties)
      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

      public String 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

      public void setup(org.glassfish.grizzly.http.server.NetworkListener networkListener, org.glassfish.grizzly.filterchain.FilterChainBuilder builder)
      Specified by:
      setup in interface org.glassfish.grizzly.http.server.AddOn
    • createAjpHandlerFilter

      protected AjpHandlerFilter createAjpHandlerFilter()
    • createAjpMessageFilter

      protected AjpMessageFilter createAjpMessageFilter()