Class ServletDetails.Builder

java.lang.Object
org.opendaylight.aaa.web.ServletDetails.Builder
Enclosing interface:
ServletDetails

public static final class ServletDetails.Builder extends Object
Builds instances of type ServletDetails. Initialize attributes and then invoke the build() method to create an immutable instance.

ServletDetails.Builder is not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.

  • Method Details

    • servlet

      public @NonNull ServletDetails.Builder servlet(javax.servlet.Servlet servlet)
      Initializes the value for the servlet attribute.
      Parameters:
      servlet - The value for servlet
      Returns:
      this builder for use in a chained invocation
    • name

      public @NonNull ServletDetails.Builder name(String name)
      Initializes the value for the name attribute.

      If not set, this attribute will have a value corresponding to servlet().getClass().getName().

      Parameters:
      name - The value for name
      Returns:
      this builder for use in a chained invocation
      Throws:
      NullPointerException - if {code name} is null
    • addUrlPattern

      public @NonNull ServletDetails.Builder addUrlPattern(String urlPattern)
      Adds one element to urlPatterns list.
      Parameters:
      urlPattern - A urlPatterns element
      Returns:
      this builder for use in a chained invocation
      Throws:
      NullPointerException - if {code urlPattern} is null
      IllegalArgumentException - if urlPattern does not meet specification criteria
    • putInitParam

      public @NonNull ServletDetails.Builder putInitParam(String key, String value)
      Put one entry to the initParams map.
      Parameters:
      key - The key in the initParams map
      value - The associated value in the initParams map
      Returns:
      this builder for use in a chained invocation
      Throws:
      NullPointerException - if any argument is null
    • asyncSupported

      public @NonNull ServletDetails.Builder asyncSupported(boolean asyncSupported)
      Initializes the value for the asyncSupported attribute.

      If not set, this attribute will have a default value of false.

      Parameters:
      asyncSupported - The value for asyncSupported
      Returns:
      this builder for use in a chained invocation
    • build

      public @NonNull ServletDetails build()
      Builds a new ServletDetails.
      Returns:
      An immutable instance of ServletDetails
      Throws:
      IllegalStateException - if any required attributes are missing