git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-analysis/EcologicalEngineWPSExtension@93440 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
af6db68fb8
commit
0a8a133065
|
@ -120,7 +120,19 @@ public class WPSClient {
|
||||||
public void describeProcess(String processID, URL processDescriptionURL) throws Exception {
|
public void describeProcess(String processID, URL processDescriptionURL) throws Exception {
|
||||||
WPSClientSession wpsClient = WPSClientSession.getInstance();
|
WPSClientSession wpsClient = WPSClientSession.getInstance();
|
||||||
try {
|
try {
|
||||||
ProcessDescriptionType processDescription = wpsClient.getProcessDescription(wpsServiceURL, processID);
|
AnalysisLogger.getLogger().debug("Describe Process WPS URL: "+wpsServiceURL);
|
||||||
|
ProcessDescriptionType processDescription = null;
|
||||||
|
for (int k=0;k<=3;k++){
|
||||||
|
try{
|
||||||
|
processDescription = wpsClient.getProcessDescription(wpsServiceURL, processID);
|
||||||
|
}catch(Exception e){
|
||||||
|
AnalysisLogger.getLogger().debug("Retrying with WPS URL: "+wpsServiceURL);
|
||||||
|
if (k==3)
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
|
if (processDescription!=null)
|
||||||
|
break;
|
||||||
|
}
|
||||||
this.currentProcessDescription = processDescription;
|
this.currentProcessDescription = processDescription;
|
||||||
// processDescription.set(XmlString.Factory.parse(new URL("http://schemas.opengis.net/wps/1.0.0/examples/40_wpsDescribeProcess_response.xml")));
|
// processDescription.set(XmlString.Factory.parse(new URL("http://schemas.opengis.net/wps/1.0.0/examples/40_wpsDescribeProcess_response.xml")));
|
||||||
if (processDescriptionURL != null)
|
if (processDescriptionURL != null)
|
||||||
|
|
|
@ -51,7 +51,7 @@ public class DynamicWPSTransducerer implements DynamicTransducer{
|
||||||
static Map<String, Transducerer> transducerersP = null;
|
static Map<String, Transducerer> transducerersP = null;
|
||||||
|
|
||||||
static long t0 = System.currentTimeMillis();
|
static long t0 = System.currentTimeMillis();
|
||||||
static long maxtime = 60*60*1000; //1h
|
static long maxtime = 2*60*60*1000; //1h
|
||||||
public static boolean isTooMuchTime(){
|
public static boolean isTooMuchTime(){
|
||||||
if (System.currentTimeMillis()-t0>maxtime){
|
if (System.currentTimeMillis()-t0>maxtime){
|
||||||
t0 = System.currentTimeMillis();
|
t0 = System.currentTimeMillis();
|
||||||
|
|
|
@ -154,9 +154,13 @@ public class WPSProcess implements Transducerer {
|
||||||
if (wpsclient ==null)
|
if (wpsclient ==null)
|
||||||
{
|
{
|
||||||
// here we build the WPS process by means of the client
|
// here we build the WPS process by means of the client
|
||||||
|
try{
|
||||||
wpsclient = new WPSClient(wpsurl);
|
wpsclient = new WPSClient(wpsurl);
|
||||||
wpsclient.describeProcess(processid);
|
wpsclient.describeProcess(processid);
|
||||||
inputsCache.put(processid, wpsclient);
|
inputsCache.put(processid, wpsclient);
|
||||||
|
}catch(Exception e){
|
||||||
|
AnalysisLogger.getLogger().debug("Error in getting process description with ID: "+processid);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inputTypes = wpsclient.getCurrentInputStatisticalTypes();
|
inputTypes = wpsclient.getCurrentInputStatisticalTypes();
|
||||||
|
@ -184,7 +188,7 @@ public class WPSProcess implements Transducerer {
|
||||||
}
|
}
|
||||||
|
|
||||||
public INFRASTRUCTURE getInfrastructure() {
|
public INFRASTRUCTURE getInfrastructure() {
|
||||||
return INFRASTRUCTURE.LOCAL;
|
return INFRASTRUCTURE.EXTERNAL_WPS;
|
||||||
}
|
}
|
||||||
|
|
||||||
public StatisticalType getOutput() {
|
public StatisticalType getOutput() {
|
||||||
|
|
Loading…
Reference in New Issue