Class ServletWebMap.Config

java.lang.Object
org.bzdev.ejws.maps.ServletWebMap.Config
Enclosing class:
ServletWebMap

public static class ServletWebMap.Config extends Object
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 with EmbeddedWebServer 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 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 none
      allowsQuery - true if the servlet adapter can process queries; false otherwise
      methods - the HTTP methods that the servlet adapter can handle