Package org.gcube.portal
Class StatsInfoService
- java.lang.Object
-
- javax.servlet.GenericServlet
-
- javax.servlet.http.HttpServlet
-
- org.gcube.portal.StatsInfoService
-
- All Implemented Interfaces:
Serializable,javax.servlet.Servlet,javax.servlet.ServletConfig
public class StatsInfoService extends javax.servlet.http.HttpServlet- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static StringCOUNTRIES_LABELstatic intHIGHER_COUNTRIESstatic intHIGHER_OPSstatic intHIGHER_SESSIONSstatic intLOWER_COUNTRIESstatic intLOWER_OPSstatic intLOWER_SESSIONSstatic StringOPERATIONS_LABELstatic StringSESSIONS_LABELstatic StringUSERS_LABELstatic StringVRES_LABEL
-
Constructor Summary
Constructors Constructor Description StatsInfoService()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static intapproximateToNearestHundred(int number)Approximates a given number to the nearest hundred.protected voiddoGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)protected voiddoPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)static StatisticsgetStatistics()voidinit()-
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
-
-
-
-
Field Detail
-
USERS_LABEL
public static final String USERS_LABEL
- See Also:
- Constant Field Values
-
COUNTRIES_LABEL
public static final String COUNTRIES_LABEL
- See Also:
- Constant Field Values
-
OPERATIONS_LABEL
public static final String OPERATIONS_LABEL
- See Also:
- Constant Field Values
-
VRES_LABEL
public static final String VRES_LABEL
- See Also:
- Constant Field Values
-
SESSIONS_LABEL
public static final String SESSIONS_LABEL
- See Also:
- Constant Field Values
-
LOWER_COUNTRIES
public static final int LOWER_COUNTRIES
- See Also:
- Constant Field Values
-
HIGHER_COUNTRIES
public static final int HIGHER_COUNTRIES
- See Also:
- Constant Field Values
-
LOWER_OPS
public static final int LOWER_OPS
- See Also:
- Constant Field Values
-
HIGHER_OPS
public static final int HIGHER_OPS
- See Also:
- Constant Field Values
-
LOWER_SESSIONS
public static final int LOWER_SESSIONS
- See Also:
- Constant Field Values
-
HIGHER_SESSIONS
public static final int HIGHER_SESSIONS
- See Also:
- Constant Field Values
-
-
Method Detail
-
init
public void init()
- Overrides:
initin classjavax.servlet.GenericServlet
-
doGet
protected void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException- Overrides:
doGetin classjavax.servlet.http.HttpServlet- Throws:
javax.servlet.ServletExceptionIOException
-
doPost
protected void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException- Overrides:
doPostin classjavax.servlet.http.HttpServlet- Throws:
javax.servlet.ServletExceptionIOException
-
getStatistics
public static Statistics getStatistics()
- Returns:
-
approximateToNearestHundred
public static int approximateToNearestHundred(int number)
Approximates a given number to the nearest hundred.- Parameters:
number- The number to approximate.- Returns:
- The number rounded to the nearest hundred.
-
-