org.gcube.messaging.common.consumerlibrary.query
Class MonitoringQuery

java.lang.Object
  extended by org.gcube.messaging.common.consumerlibrary.query.Query<ConsumerCL>
      extended by org.gcube.messaging.common.consumerlibrary.query.MonitoringQuery
All Implemented Interfaces:
Serializable

public class MonitoringQuery
extends Query<ConsumerCL>

Author:
Andrea Manzi(CERN)
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.gcube.messaging.common.consumerlibrary.query.Query
call, dateFormat, groupClause, limitClause, orderClause, query, results
 
Constructor Summary
MonitoringQuery()
           
 
Method Summary
 String getAllTodayGHNAverage(org.gcube.messaging.common.messages.Test.TestType type)
          getAllTodayGHNAverage
 String getGHNAverage(org.gcube.messaging.common.messages.Test.TestType type, String ghn)
          getGHNAverage
 Map<String,ArrayList<String>> getGHNs()
          return the GHNs
 String getNotifications()
          get all the notification
 HashMap<String,String> getProbes()
          Get the available probes
 String getRIMessages(String serviceClass, String serviceName)
          getRIMessages
 String getStatistics(String testType, String GHNName, String startDate, String endDate, String groupBy)
           
 String getTodayGHNAverage(org.gcube.messaging.common.messages.Test.TestType type, String ghn)
          getTodayGHNAverage
 String getTodayNotifications()
          getTodayNotifications
 String getTodayRIMessages(String serviceClass, String serviceName)
          getTodayRIMessages
 String performQuery()
          The method implemented by subclasses, that performed the query
 
Methods inherited from class org.gcube.messaging.common.consumerlibrary.query.Query
getCall, getDimensions, getGroupClause, getLimitClause, getOrderClause, getQuery, getResults, getResultsAsArray, printQueryResults, query, setCall, setGroupClause, setLimitClause, setLimitClause, setOrderClause, setQuery, setResults, toJSON
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MonitoringQuery

public MonitoringQuery()
Method Detail

performQuery

public String performQuery()
                    throws Exception
Description copied from class: Query
The method implemented by subclasses, that performed the query

Specified by:
performQuery in class Query<ConsumerCL>
Returns:
the query result as a string
Throws:
Exception

getGHNAverage

public String getGHNAverage(org.gcube.messaging.common.messages.Test.TestType type,
                            String ghn)
                     throws EmptyResultException,
                            Exception
getGHNAverage

Parameters:
type - Test.TestType
ghn - the ghn
Returns:
average
Throws:
Exception
EmptyResultException

getTodayGHNAverage

public String getTodayGHNAverage(org.gcube.messaging.common.messages.Test.TestType type,
                                 String ghn)
                          throws EmptyResultException,
                                 Exception
getTodayGHNAverage

Parameters:
type - Test.TestType
ghn - ghn name
Returns:
the today average
Throws:
Exception
EmptyResultException

getProbes

public HashMap<String,String> getProbes()
                                 throws Exception
Get the available probes

Returns:
Throws:
Exception

getGHNs

public Map<String,ArrayList<String>> getGHNs()
                                      throws Exception
return the GHNs

Returns:
Throws:
Exception

getAllTodayGHNAverage

public String getAllTodayGHNAverage(org.gcube.messaging.common.messages.Test.TestType type)
                             throws Exception
getAllTodayGHNAverage

Parameters:
type - Test.TestType
Returns:
the today average
Throws:
Exception - exception

getNotifications

public String getNotifications()
                        throws Exception
get all the notification

Returns:
get all the notification
Throws:
Exception - exception

getTodayNotifications

public String getTodayNotifications()
                             throws Exception
getTodayNotifications

Returns:
JSONArray
Throws:
Exception - exception

getTodayRIMessages

public String getTodayRIMessages(String serviceClass,
                                 String serviceName)
                          throws Exception
getTodayRIMessages

Returns:
JSONArray
Throws:
Exception
EmptyResultException - Exception

getRIMessages

public String getRIMessages(String serviceClass,
                            String serviceName)
                     throws Exception
getRIMessages

Returns:
JSONArray
Throws:
Exception

getStatistics

public String getStatistics(String testType,
                            String GHNName,
                            String startDate,
                            String endDate,
                            String groupBy)
                     throws Exception
Throws:
Exception


Copyright © 2013. All Rights Reserved.