Class CorsSupport

All Implemented Interfaces:
Handler, HttpService, ServerLifecycle

SE implementation of CorsSupportBase.
  • Method Details

    • builder

      public static CorsSupport.Builder builder()
      A new fluent API builder to customize setup of CorsSupport.
      Returns:
      new builder for CorsSupport
    • create

      public static CorsSupport create()
      Create CORS support with defaults.
      Returns:
      new CorsSupport with default settings
    • create

      public static CorsSupport create(Config config)
      Creates a new CorsSupport instance based on the provided configuration expected to match the basic CrossOriginConfig format.
      Parameters:
      config - node containing the cross-origin information
      Returns:
      initialized CorsSupport instance
    • createMapped

      public static CorsSupport createMapped(Config config)
      Creates a new CorsSupport instance based on the provided configuration expected to contain mapped cross-origin config information.
      Parameters:
      config - node containing the mapped cross-origin information
      Returns:
      initialized CorsSupport instance
    • routing

      public void routing(HttpRules rules)
      Description copied from interface: HttpService
      Updates the routing to add handlers of this service.
      Specified by:
      routing in interface HttpService
      Parameters:
      rules - to update
    • handle

      public void handle(ServerRequest req, ServerResponse res)
      Description copied from interface: Handler
      Handle request. This method must not return before the response is completed. If the method does asynchronous operations, it must wait for them to complete before returning.
      Specified by:
      handle in interface Handler
      Parameters:
      req - request
      res - response
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • helper

      Overrides:
      helper in class CorsSupportBase<ServerRequest,ServerResponse,CorsSupport,CorsSupport.Builder>