Class CamelServletConfig.ServletConfig
java.lang.Object
org.apache.camel.quarkus.servlet.runtime.CamelServletConfig.ServletConfig
- Enclosing class:
- CamelServletConfig
camel-servlet component configuration-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final StringA fully qualified name of a servlet class to serve paths that matchurlPatternsA servletName as it would be defined in a `web.xml` file or in theWebServlet.name()annotation.A comma separated list of path patterns under which the CamelServlet should be accessible. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSetting the servlet name is possible both viaservletNameand the key in theorg.apache.camel.quarkus.servlet.runtime.CamelServletConfig.ServletsConfig#namedServletsmap.booleanisValid()
-
Field Details
-
DEFAULT_SERVLET_NAME
- See Also:
-
DEFAULT_SERVLET_CLASS
- See Also:
-
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 servletClassA fully qualified name of a servlet class to serve paths that matchurlPatterns -
servletName
A servletName as it would be defined in a `web.xml` file or in theWebServlet.name()annotation.
-
-
Constructor Details
-
ServletConfig
public ServletConfig()
-
-
Method Details
-
isValid
public boolean isValid()- Returns:
trueif thisCamelServletConfig.ServletConfigis valid as a whole. This currently translates tourlPatternsbeing non-empty becauseservletClassandservletNamehave default values. Otherwise returnsfalse.
-
getEffectiveServletName
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
-