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-servletcomponent configuration
-
-
Field Summary
Fields Modifier and Type Field Description static StringDEFAULT_SERVLET_CLASSstatic StringDEFAULT_SERVLET_NAMEStringservletClassA fully qualified name of a servlet class to serve paths that matchurlPatternsStringservletNameA servletName as it would be defined in a `web.xml` file or in theWebServlet.name()annotation.Optional<List<String>>urlPatternsA comma separated list of path patterns under which the CamelServlet should be accessible.
-
Constructor Summary
Constructors Constructor Description ServletConfig()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetEffectiveServletName(String key)Setting the servlet name is possible both viaservletNameand the key in theorg.apache.camel.quarkus.servlet.runtime.CamelServletConfig.ServletsConfig#namedServletsmap.booleanisValid()
-
-
-
Field Detail
-
DEFAULT_SERVLET_NAME
public static final String DEFAULT_SERVLET_NAME
- See Also:
- Constant Field Values
-
DEFAULT_SERVLET_CLASS
public static final String DEFAULT_SERVLET_CLASS
- See Also:
- Constant Field Values
-
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 matchurlPatterns
-
servletName
@ConfigItem(defaultValue="CamelServlet") public String servletName
A servletName as it would be defined in a `web.xml` file or in theWebServlet.name()annotation.
-
-
Method Detail
-
isValid
public boolean isValid()
- Returns:
trueif thisCamelServletConfig.ServletConfigis valid as a whole. This currently translates tourlPatternsbeing non-empty becauseservletClassandservletNamehave default values. Otherwise returnsfalse.
-
getEffectiveServletName
public String getEffectiveServletName(String key)
Setting the servlet name is possible both viaservletNameand the key in theorg.apache.camel.quarkus.servlet.runtime.CamelServletConfig.ServletsConfig#namedServletsmap. This method sets the precedence: theservletNamegets effective only if it has a non-default value; otherwise thekeyis returned as the servlet name.- Parameters:
key- the key used inorg.apache.camel.quarkus.servlet.runtime.CamelServletConfig.ServletsConfig#namedServlets- Returns:
- the effective servlet name to use
-
-