/** * */ package jalview.ws; abstract class WSJob extends AWsJob { /* (non-Javadoc) * @see jalview.ws.AWsJob#clearResponse() */ @Override public void clearResponse() { result = null; } /* (non-Javadoc) * @see jalview.ws.AWsJob#hasResponse() */ @Override public boolean hasResponse() { return result!=null; } /* (non-Javadoc) * @see jalview.ws.AWsJob#hasStatus() */ @Override public boolean hasStatus() { return result!=null && result.getStatus()!=null; } /** * The last result object returned by the service. */ vamsas.objects.simple.Result result; /** * @return * @see vamsas.objects.simple.Result#getStatus() */ public String getStatus() { return result==null ? null : result.getStatus(); } public String getState() { return result==null ? "NULL result" : ""+result.getState(); } /** * @return * @see vamsas.objects.simple.Result#isBroken() */ public boolean isBroken() { return result!=null && result.isBroken(); } /** * @return * @see vamsas.objects.simple.Result#isFailed() */ public boolean isFailed() { return result!=null && result.isFailed(); } /** * @return * @see vamsas.objects.simple.Result#isFinished() */ public boolean isFinished() { return result!=null && result.isFinished(); } /** * @return * @see vamsas.objects.simple.Result#isInvalid() */ public boolean isInvalid() { return result!=null && result.isInvalid(); } /** * @return * @see vamsas.objects.simple.Result#isJobFailed() */ public boolean isJobFailed() { return result!=null && result.isJobFailed(); } /** * @return * @see vamsas.objects.simple.Result#isQueued() */ public boolean isQueued() { return result!=null && result.isQueued(); } /** * @return * @see vamsas.objects.simple.Result#isRunning() */ public boolean isRunning() { return result!=null && result.isRunning(); } /** * @return * @see vamsas.objects.simple.Result#isServerError() */ public boolean isServerError() { return result!=null && result.isServerError(); } }