Class AjpAddOn

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

public class AjpAddOn extends Object implements 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(NetworkListener networkListener, FilterChainBuilder builder)
      Description copied from interface: AddOn
      The method, which will be invoked by HttpServer in order to initialize the AddOn on the passed NetworkListener. Most of the time the AddOn implementation will update the passed NetworkListener's FilterChainBuilder by adding custom Filter(s), which implement AddOn's logic.
      Specified by:
      setup in interface AddOn
      Parameters:
      networkListener - the NetworkListener the addon is being initialized on.
      builder - the FilterChainBuilder, representing the NetworkListener logic.
    • createAjpHandlerFilter

      protected AjpHandlerFilter createAjpHandlerFilter()
    • createAjpMessageFilter

      protected AjpMessageFilter createAjpMessageFilter()