java.lang.Object
org.bzdev.ejws.maps.ServletWebMap.Config
- Enclosing class:
- ServletWebMap
ServletWebMap configuration.
This class provides the argument used in constructing
an instance of
ServletWebMap
. The constructor's
arguments provide
- a servlet adapter. This object determines the behavior
of a
ServletWebMap
. Its interface is designed so that it can plugged into a servlet designed as a 'wrapper' class, in addition to its use withEmbeddedWebServer
so that the same code can be used in both environments. - a parameter map. This is a
map
whose keys and values are both strings. It is used to provide data for configuring a servlet adapter. These parameters should have the same keys as those that would be used by the ServletConfig method getInitParameters when configuring a servlet. - a flag. The value is 'true' if the servlet adapter
uses the 'query' field in a URL or URI, and false
otherwise. When false,
FileHandler
will automatically generate a 404 response code if a query is present. - a variable number of HTTP methods. These list the HTTP methods that are supported. If no methods are provided a default is used.
-
Constructor Summary
ConstructorsConstructorDescriptionConfig
(ServletAdapter sa, Map<String, String> parameters, boolean allowsQuery, HttpMethod... methods) Constructor. -
Method Summary
-
Constructor Details
-
Config
public Config(ServletAdapter sa, Map<String, String> parameters, boolean allowsQuery, HttpMethod... methods) Constructor.- Parameters:
sa
- the servlet adapter.parameters
- configuration parameters; null or an empty map if there are noneallowsQuery
- true if the servlet adapter can process queries; false otherwisemethods
- the HTTP methods that the servlet adapter can handle
-