org.gcube.vremanagement.resourcebroker.impl.services
Class ISClientRequester

java.lang.Object
  extended by org.gcube.vremanagement.resourcebroker.impl.services.ISClientRequester

public class ISClientRequester
extends java.lang.Object

Consists of a proxy between the BrokerService and the gCube Information System. Holds the persistent stand-alone resource where stores the status of monitored gCube Resources. After a delay the information about the monitored resources is refreshed by TUpdateGHNProfiles thread.

Author:
Daniele Strollo (ISTI-CNR)

Constructor Summary
ISClientRequester()
           
 
Method Summary
static Tuple<java.lang.String> getRIAndGHN(GCUBEScope queryScope, java.lang.String riID)
           Given an RI identifier and the scope in which it shoud be retrieved, the IS is queried about the corresponding GHN on which the RI is actually running.
static GHNDescriptor getRIOnGHNByID(GCUBEScope queryScope, java.lang.String ghnID)
          Returns the GHNDescriptor for a given GHN_ID in a given scope.
static java.util.List<GHNDescriptor> getRIOnGHNs(GCUBEScope queryScope)
          Returns the list of GHNDescriptor declared in this scope.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ISClientRequester

public ISClientRequester()
Method Detail

getRIOnGHNs

public static final java.util.List<GHNDescriptor> getRIOnGHNs(GCUBEScope queryScope)
                                                       throws java.lang.Exception
Returns the list of GHNDescriptor declared in this scope.

Parameters:
queryScope - the scope in which the query must be executed.
Returns:
a list of GHNDescriptor elems.
Throws:
java.lang.Exception - if something goes wrong.

getRIAndGHN

public static final Tuple<java.lang.String> getRIAndGHN(GCUBEScope queryScope,
                                                        java.lang.String riID)
                                                 throws java.lang.Exception

Given an RI identifier and the scope in which it shoud be retrieved, the IS is queried about the corresponding GHN on which the RI is actually running.

Returns a Tuple of two elements RI_ID and GHN_ID.

Parameters:
queryScope - the scope of RI
riID - the unique ID of the RunningInstance
Returns:
null if no correspondence is found
Throws:
java.lang.Exception - if IS query fails

getRIOnGHNByID

public static final GHNDescriptor getRIOnGHNByID(GCUBEScope queryScope,
                                                 java.lang.String ghnID)
                                          throws java.lang.Exception
Returns the GHNDescriptor for a given GHN_ID in a given scope.

Parameters:
queryScope - the scope in which the query must be executed.
ghnID - the ghn identifier to lookup.
Throws:
java.lang.Exception - if something goes wrong.