public static class CamelServletConfig.ServletConfig extends Object
camel-servlet component configuration| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_SERVLET_CLASS |
static String |
DEFAULT_SERVLET_NAME |
String |
servletClass
A fully qualified name of a servlet class to serve paths that match
urlPatterns |
String |
servletName
A servletName as it would be defined in a `web.xml` file or in the
javax.servlet.annotation.WebServlet#name() annotation. |
List<String> |
urlPatterns
A comma separated list of path patterns under which the CamelServlet should be accessible.
|
| Constructor and Description |
|---|
ServletConfig() |
| Modifier and Type | Method and Description |
|---|---|
String |
getEffectiveServletName(String key)
Setting the servlet name is possible both via
servletName and the key in the
CamelServletConfig.ServletsConfig.namedServlets map. |
boolean |
isValid() |
public static final String DEFAULT_SERVLET_NAME
public static final String DEFAULT_SERVLET_CLASS
@ConfigItem public List<String> urlPatterns
/*, /services/*@ConfigItem(defaultValue="org.apache.camel.component.servlet.CamelHttpTransportServlet") public String servletClass
urlPatterns@ConfigItem(defaultValue="CamelServlet") public String servletName
javax.servlet.annotation.WebServlet#name() annotation.public boolean isValid()
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.public String getEffectiveServletName(String key)
servletName and the key in the
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.key - the key used in
CamelServletConfig.ServletsConfig.namedServletsCopyright © 2019–2020 The Apache Software Foundation. All rights reserved.