Class CamelServletConfig.ServletConfig

java.lang.Object
org.apache.camel.quarkus.servlet.runtime.CamelServletConfig.ServletConfig
Enclosing class:
CamelServletConfig

public static class CamelServletConfig.ServletConfig extends Object
camel-servlet component configuration
  • Field Details

    • DEFAULT_SERVLET_NAME

      public static final String DEFAULT_SERVLET_NAME
      See Also:
    • DEFAULT_SERVLET_CLASS

      public static final String DEFAULT_SERVLET_CLASS
      See Also:
    • urlPatterns

      @ConfigItem public Optional<List<String>> urlPatterns
      A comma separated list of path patterns under which the CamelServlet should be accessible. Example path patterns: /*, /services/*
    • servletClass

      @ConfigItem(defaultValue="org.apache.camel.component.servlet.CamelHttpTransportServlet") public String servletClass
      A fully qualified name of a servlet class to serve paths that match urlPatterns
    • servletName

      @ConfigItem(defaultValue="CamelServlet") public String servletName
      A servletName as it would be defined in a `web.xml` file or in the WebServlet.name() annotation.
  • Constructor Details

    • ServletConfig

      public ServletConfig()
  • Method Details

    • isValid

      public boolean isValid()
      Returns:
      true if this CamelServletConfig.ServletConfig is valid as a whole. This currently translates to urlPatterns being non-empty because servletClass and servletName have default values. Otherwise returns false.
    • getEffectiveServletName

      public String getEffectiveServletName(String key)
      Setting the servlet name is possible both via servletName and the key in the org.apache.camel.quarkus.servlet.runtime.CamelServletConfig.ServletsConfig#namedServlets map. This method sets the precedence: the servletName gets effective only if it has a non-default value; otherwise the key is returned as the servlet name.
      Parameters:
      key - the key used in org.apache.camel.quarkus.servlet.runtime.CamelServletConfig.ServletsConfig#namedServlets
      Returns:
      the effective servlet name to use