Class JMXSummaryUtils.StarredRequest
- java.lang.Object
-
- dk.netarkivet.monitor.webinterface.JMXSummaryUtils.StarredRequest
-
- Enclosing class:
- JMXSummaryUtils
public static class JMXSummaryUtils.StarredRequest extends Object
This class encapsulates a HttpServletRequest, making non-existing parameters appear as "*" for wildcard (or "0" for the index parameter).
-
-
Constructor Summary
Constructors Constructor Description StarredRequest(javax.servlet.http.HttpServletRequest req)
Makes the request reusable for this class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getParameter(String paramName)
Gets a parameter from the original request, except if the parameter is unset, return the following.
-
-
-
Constructor Detail
-
StarredRequest
public StarredRequest(javax.servlet.http.HttpServletRequest req) throws ArgumentNotValid
Makes the request reusable for this class.- Parameters:
req
- A http request, for a starred request, should not be null.- Throws:
ArgumentNotValid
- if argument isn't valid.
-
-
Method Detail
-
getParameter
public String getParameter(String paramName) throws ArgumentNotValid
Gets a parameter from the original request, except if the parameter is unset, return the following. "index" = "0". "applicationInstanceId" = "-". "location" = "-". "http-port" = "-". Default = "*".- Parameters:
paramName
- The parameter.- Returns:
- The parameter or "*", "0" or "-"; never null.
- Throws:
ArgumentNotValid
- if argument isn't valid.
-
-