X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fws%2Frest%2FRestJobThread.java;fp=src%2Fjalview%2Fws%2Frest%2FRestJobThread.java;h=f32535c056f0a826a7f50250f996513f77a24996;hb=cb8e52fbbc5f725e3f7f48c672cdddb0690bd978;hp=1cb1bc2153be458926cbb9af59ec9f1cd791e19c;hpb=1c721468246c2aafd86fc52d954512374f576b11;p=jalview.git
diff --git a/src/jalview/ws/rest/RestJobThread.java b/src/jalview/ws/rest/RestJobThread.java
index 1cb1bc2..f32535c 100644
--- a/src/jalview/ws/rest/RestJobThread.java
+++ b/src/jalview/ws/rest/RestJobThread.java
@@ -22,7 +22,7 @@ package jalview.ws.rest;
import java.util.Locale;
-import jalview.bin.Cache;
+import jalview.bin.Console;
import jalview.datamodel.Alignment;
import jalview.datamodel.AlignmentAnnotation;
import jalview.datamodel.AlignmentI;
@@ -268,7 +268,7 @@ public class RestJobThread extends AWSThread
+ "
See Console output for details.";
rj.setAllowedServerExceptions(0);// unrecoverable;
rj.error = true;
- Cache.fatal("Unexpected REST Job " + getStage(stg)
+ Console.fatal("Unexpected REST Job " + getStage(stg)
+ "exception for URL " + rj.rsd.postUrl);
throw (he);
} catch (IOException e)
@@ -277,7 +277,7 @@ public class RestJobThread extends AWSThread
+ "Job.
Problematic url was " + request.getURI()
+ "
See Console output for details.";
- Cache.warn("IO Exception for REST Job " + getStage(stg)
+ Console.warn("IO Exception for REST Job " + getStage(stg)
+ "exception for URL " + rj.rsd.postUrl);
throw (e);
@@ -286,7 +286,7 @@ public class RestJobThread extends AWSThread
{
case 200:
rj.running = false;
- Cache.debug("Processing result set.");
+ Console.debug("Processing result set.");
processResultSet(rj, response, request);
break;
case 202:
@@ -304,7 +304,7 @@ public class RestJobThread extends AWSThread
{
if (loc.length > 1)
{
- Cache.warn("Ignoring additional " + (loc.length - 1)
+ Console.warn("Ignoring additional " + (loc.length - 1)
+ " location(s) provided in response header ( next one is '"
+ loc[1].getValue() + "' )");
}
@@ -326,7 +326,7 @@ public class RestJobThread extends AWSThread
default:
// Some other response. Probably need to pop up the content in a window.
// TODO: deal with all other HTTP response codes from server.
- Cache.warn("Unhandled response status when " + getStage(stg)
+ Console.warn("Unhandled response status when " + getStage(stg)
+ "for " + postUrl + ": " + response.getStatusLine());
rj.error = true;
rj.setAllowedServerExceptions(0);
@@ -340,7 +340,7 @@ public class RestJobThread extends AWSThread
+ "
Filtered response content below:
");
} catch (IOException e)
{
- Cache.debug("IOException when consuming unhandled response",
+ Console.debug("IOException when consuming unhandled response",
e);
}
;
@@ -447,7 +447,7 @@ public class RestJobThread extends AWSThread
{
job.setSubjobComplete(true);
job.setAllowedServerExceptions(-1);
- Cache.error("Exception when trying to start Rest Job.", ex);
+ Console.error("Exception when trying to start Rest Job.", ex);
}
}
@@ -456,7 +456,7 @@ public class RestJobThread extends AWSThread
{
// crazy users will see this message
// TODO: finish this! and remove the message below!
- Cache.warn("Rest job result parser is currently INCOMPLETE!");
+ Console.warn("Rest job result parser is currently INCOMPLETE!");
int validres = 0;
for (RestJob rj : (RestJob[]) jobs)
{
@@ -465,22 +465,22 @@ public class RestJobThread extends AWSThread
String ln = null;
try
{
- Cache.debug("Parsing data for job " + rj.getJobId());
+ Console.debug("Parsing data for job " + rj.getJobId());
rj.parseResultSet();
if (rj.hasResults())
{
validres++;
}
- Cache.debug("Finished parsing data for job " + rj.getJobId());
+ Console.debug("Finished parsing data for job " + rj.getJobId());
} catch (Error ex)
{
- Cache.warn(
+ Console.warn(
"Failed to finish parsing data for job " + rj.getJobId());
ex.printStackTrace();
} catch (Exception ex)
{
- Cache.warn(
+ Console.warn(
"Failed to finish parsing data for job " + rj.getJobId());
ex.printStackTrace();
} finally
@@ -756,7 +756,7 @@ public class RestJobThread extends AWSThread
{
// TODO: decide if multiple multiple alignments returned by
// non-vseparable services are allowed.
- Cache.warn(
+ Console.warn(
"dealing with multiple alignment products returned by non-vertically separable service.");
}
// recover reference to last alignment created for this rest frame
@@ -870,7 +870,7 @@ public class RestJobThread extends AWSThread
}
else
{
- Cache.warn(
+ Console.warn(
"Couldn't resolve original sequence for new sequence.");
}
}
@@ -948,7 +948,7 @@ public class RestJobThread extends AWSThread
grass = groupNames.get(alan[nrj][an].groupRef.getName());
if (grass == null)
{
- Cache.error(
+ Console.error(
"Couldn't relocate group referemce for group "
+ alan[nrj][an].groupRef.getName());
}
@@ -999,7 +999,7 @@ public class RestJobThread extends AWSThread
{
// TODO: process each newick file, lifting over sequence refs to
// current alignment, if necessary.
- Cache.error(
+ Console.error(
"Tree recovery from restjob not yet implemented.");
}
}