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

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

public class MonitoringQuery
extends Query<MessagingConsumerServiceCall>

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

Constructor Summary
MonitoringQuery()
           
 
Method Summary
 java.lang.String getAllTodayGHNAverage(org.gcube.messaging.common.messages.Test.TestType type)
          getAllTodayGHNAverage
 java.lang.String getGHNAverage(org.gcube.messaging.common.messages.Test.TestType type, java.lang.String ghn)
          getGHNAverage
 java.util.Map<java.lang.String,java.util.ArrayList<java.lang.String>> getGHNs()
          return the GHNs
 java.lang.String getNotifications()
          get all the notification
 java.util.HashMap<java.lang.String,java.lang.String> getProbes()
          Get the available probes
 java.lang.String getRIMessages(java.lang.String serviceClass, java.lang.String serviceName)
          getRIMessages
 java.lang.String getStatistics(java.lang.String testType, java.lang.String GHNName, java.lang.String startDate, java.lang.String endDate, java.lang.String groupBy)
           
 java.lang.String getTodayGHNAverage(org.gcube.messaging.common.messages.Test.TestType type, java.lang.String ghn)
          getTodayGHNAverage
 java.lang.String getTodayNotifications()
          getTodayNotifications
 java.lang.String getTodayRIMessages(java.lang.String serviceClass, java.lang.String serviceName)
          getTodayRIMessages
 java.lang.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
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MonitoringQuery

public MonitoringQuery()
Method Detail

performQuery

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

Returns:
the query result as a string
Throws:
java.lang.Exception

getGHNAverage

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

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

getTodayGHNAverage

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

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

getProbes

public java.util.HashMap<java.lang.String,java.lang.String> getProbes()
                                                               throws java.lang.Exception
Get the available probes

Returns:
Throws:
java.lang.Exception

getGHNs

public java.util.Map<java.lang.String,java.util.ArrayList<java.lang.String>> getGHNs()
                                                                              throws java.lang.Exception
return the GHNs

Returns:
Throws:
java.lang.Exception

getAllTodayGHNAverage

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

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

getNotifications

public java.lang.String getNotifications()
                                  throws java.lang.Exception
get all the notification

Returns:
get all the notification
Throws:
java.lang.Exception - exception

getTodayNotifications

public java.lang.String getTodayNotifications()
                                       throws java.lang.Exception
getTodayNotifications

Returns:
JSONArray
Throws:
java.lang.Exception - exception

getTodayRIMessages

public java.lang.String getTodayRIMessages(java.lang.String serviceClass,
                                           java.lang.String serviceName)
                                    throws java.lang.Exception
getTodayRIMessages

Returns:
JSONArray
Throws:
java.lang.Exception
EmptyResultException - Exception

getRIMessages

public java.lang.String getRIMessages(java.lang.String serviceClass,
                                      java.lang.String serviceName)
                               throws java.lang.Exception
getRIMessages

Returns:
JSONArray
Throws:
java.lang.Exception

getStatistics

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