Class HSTSHandler

java.lang.Object
io.vertx.mutiny.ext.web.handler.HSTSHandler
All Implemented Interfaces:
MutinyDelegate, io.vertx.core.Handler<RoutingContext>, SecurityPolicyHandler, Consumer<RoutingContext>

public class HSTSHandler extends Object implements SecurityPolicyHandler, io.vertx.core.Handler<RoutingContext>, Consumer<RoutingContext>, MutinyDelegate
HTTP Strict Transport Security (HSTS) RFC6797. This handler adds the strict transport security headers, for this domain or subdomains.

NOTE: This class has been automatically generated from the original non Mutiny-ified interface.

Author:
Paulo Lopes
See Also:
  • HSTSHandler
  • Field Details

  • Constructor Details

    • HSTSHandler

      public HSTSHandler(io.vertx.ext.web.handler.HSTSHandler delegate)
      Create a new instance of HSTSHandler delegating to the given (non-null) instance of HSTSHandler.
    • HSTSHandler

      public HSTSHandler(Object delegate)
  • Method Details

    • accept

      public void accept(RoutingContext item)
      Handle an item. This method is generated from the original method."
      Specified by:
      accept in interface Consumer<RoutingContext>
      Specified by:
      accept in interface SecurityPolicyHandler
    • handle

      public void handle(RoutingContext item)
      Handle an item. This method is generated from the original method."
      Specified by:
      handle in interface io.vertx.core.Handler<RoutingContext>
      Specified by:
      handle in interface SecurityPolicyHandler
    • getDelegate

      public io.vertx.ext.web.handler.HSTSHandler getDelegate()
      Get the delegate instance.

      This method returns the instance on which this shim is delegating the calls. And so, give you access to the bare API.

      Specified by:
      getDelegate in interface MutinyDelegate
      Specified by:
      getDelegate in interface SecurityPolicyHandler
      Returns:
      the delegate instance
    • create

      public static HSTSHandler create(long maxAge, boolean includeSubDomains)
      Creates a new instance that shall consider the configuration for sub domains.
      Parameters:
      maxAge - max age to attribute to the header
      includeSubDomains - consider sub domains when adding the header
      Returns:
      an instance.
    • create

      public static HSTSHandler create(boolean includeSubDomains)
      Creates a new instance that shall consider the configuration for sub domains.
      Parameters:
      includeSubDomains - consider sub domains when adding the header
      Returns:
      an instance.
    • create

      public static HSTSHandler create()
      Creates a new instance that does not consider the configuration for sub domains. Using the default max age.
      Returns:
      an instance.
    • newInstance

      public static HSTSHandler newInstance(io.vertx.ext.web.handler.HSTSHandler delegate)
      Creates a new instance of the HSTSHandler.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object