Klasse ServletParameterParser

java.lang.Object
server.restful.common.parameter.ServletParameterParser

public class ServletParameterParser extends Object
Parse servlet parameters using JCommander based on annotated parameter objects. Servlet path is treated like a main argument and servlet parameters as options.
Autor:
khaendel
  • Felddetails

    • VALUE_ABSENT

      private static final List<String> VALUE_ABSENT
    • commander

      private final com.beust.jcommander.JCommander commander
    • usageFormatter

      private final ServletUsageFormatter usageFormatter
  • Konstruktordetails

    • ServletParameterParser

      public ServletParameterParser(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Object parameterObject) throws IOException
      Parse request parameters and request path according to annotated parameters of the parameterObject.
      Parameter:
      request - servlet request to parse
      response - servlet response to output usage message
      parameterObject - annotated parameters of the parameterObject
      Löst aus:
      IOException
    • ServletParameterParser

      public ServletParameterParser(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Object parameterObject, boolean acceptUnknownOptions) throws IOException
      Löst aus:
      IOException
  • Methodendetails

    • usage

      public void usage()
    • setException

      public void setException(Exception exception)
    • hasException

      public boolean hasException()
    • getRequestParametersAsCommandLine

      public static String[] getRequestParametersAsCommandLine(jakarta.servlet.http.HttpServletRequest request)