dk.netarkivet.monitor.webinterface
Class JMXSummaryUtils.StarredRequest

java.lang.Object
  extended by dk.netarkivet.monitor.webinterface.JMXSummaryUtils.StarredRequest
Enclosing class:
JMXSummaryUtils

public static class JMXSummaryUtils.StarredRequest
extends java.lang.Object

This class encapsulates a HttpServletRequest, making non-existing parameters appear as "*" for wildcard (or "0" for the index parameter).


Field Summary
(package private)  javax.servlet.http.HttpServletRequest req
          A http request, for a starred request.
 
Constructor Summary
JMXSummaryUtils.StarredRequest(javax.servlet.http.HttpServletRequest req)
          Makes the request reusable for this class.
 
Method Summary
 java.lang.String getParameter(java.lang.String paramName)
          Gets a parameter from the original request, except if the parameter is unset, return the following.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

req

javax.servlet.http.HttpServletRequest req
A http request, for a starred request.

Constructor Detail

JMXSummaryUtils.StarredRequest

public JMXSummaryUtils.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 java.lang.String getParameter(java.lang.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.