Class Discover
java.lang.Object
org.gcube.vremanagement.executor.client.query.Discover
Finds the Smart Executor instances in the Resource Registry, in the Context of the current
request: the access points of the active Smart Executor EServices, optionally only of those that
activate an active RunningPlugin with a given name.
- Author:
- Luca Frosini (ISTI - CNR)
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final StringThe only state in which an EService or a RunningPlugin receives requests.protected static final StringThe same, only for the EServices that activate a RunningPlugin with a name and a state.protected static final StringAccess points of the EServices with a group, a name and a state. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAddresses(String queryTemplate, org.gcube.com.fasterxml.jackson.databind.node.ObjectNode params) Runs a Query Template and keeps the endpoints of the access points of the REST application of the Smart Executor: an EService has one access point per servlet.Returns the addresses of every active Smart Executor instance.getInstancesAddress(String pluginName) Returns the addresses of the Smart Executor instances that run a plugin.protected static org.gcube.com.fasterxml.jackson.databind.node.ObjectNode
-
Field Details
-
SERVICE_QUERY_TEMPLATE
Access points of the EServices with a group, a name and a state.- See Also:
-
PLUGIN_QUERY_TEMPLATE
The same, only for the EServices that activate a RunningPlugin with a name and a state.- See Also:
-
ACTIVE
The only state in which an EService or a RunningPlugin receives requests.- See Also:
-
-
Constructor Details
-
Discover
public Discover()
-
-
Method Details
-
getInstancesAddress
public static List<String> getInstancesAddress(String pluginName) throws org.gcube.vremanagement.executor.exception.ExecutorException Returns the addresses of the Smart Executor instances that run a plugin.- Parameters:
pluginName- the name of the plugin, its Maven artifactId- Returns:
- the addresses, never empty
- Throws:
org.gcube.vremanagement.executor.exception.ExecutorException- if the Resource Registry cannot be queried or no instance runs the plugin
-
getInstancesAddress
public static List<String> getInstancesAddress() throws org.gcube.vremanagement.executor.exception.ExecutorExceptionReturns the addresses of every active Smart Executor instance.- Returns:
- the addresses; empty when there is none
- Throws:
org.gcube.vremanagement.executor.exception.ExecutorException- if the Resource Registry cannot be queried
-
getServiceParams
protected static org.gcube.com.fasterxml.jackson.databind.node.ObjectNode getServiceParams() -
getAddresses
protected static List<String> getAddresses(String queryTemplate, org.gcube.com.fasterxml.jackson.databind.node.ObjectNode params) throws org.gcube.vremanagement.executor.exception.ExecutorException Runs a Query Template and keeps the endpoints of the access points of the REST application of the Smart Executor: an EService has one access point per servlet.- Throws:
org.gcube.vremanagement.executor.exception.ExecutorException
-