PTP
Release 5.0

org.eclipse.ptp.core
Class AbstractJobSubmission

java.lang.Object
  extended by org.eclipse.ptp.core.AbstractJobSubmission

public abstract class AbstractJobSubmission
extends java.lang.Object

Abstract class to manage coordination of job submission with receipt of the corresponding event. Because model IDs are always server generated, we require some way to link a job submission with the corresponding INewJobEvent, which is done using the jobSubID attribute. However, it is often necessary to wait for the event to be received without blocking the UI. This class provides a waitFor method for this purpose. The INewJobEvent handler should set the status to SUBMITTED once the event is received.

Since:
5.0

Nested Class Summary
static class AbstractJobSubmission.JobSubStatus
          Status of the job submission (NOT the job itself)
 
Constructor Summary
AbstractJobSubmission(int count)
           
AbstractJobSubmission(java.lang.String id)
           
 
Method Summary
 java.lang.String getError()
           
 java.lang.String getId()
           
 void setError(java.lang.String error)
          set the error
 void setStatus(AbstractJobSubmission.JobSubStatus status)
          set the current status
 AbstractJobSubmission.JobSubStatus waitFor(org.eclipse.core.runtime.IProgressMonitor monitor)
          Wait for the job state to change
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractJobSubmission

public AbstractJobSubmission(int count)

AbstractJobSubmission

public AbstractJobSubmission(java.lang.String id)
Method Detail

getError

public java.lang.String getError()
Returns:
the error

getId

public java.lang.String getId()
Returns:
the job submission id

setError

public void setError(java.lang.String error)
set the error


setStatus

public void setStatus(AbstractJobSubmission.JobSubStatus status)
set the current status


waitFor

public AbstractJobSubmission.JobSubStatus waitFor(org.eclipse.core.runtime.IProgressMonitor monitor)
Wait for the job state to change

Returns:
the state

PTP
Release 5.0

Copyright (c) 2011 IBM Corporation and others. All Rights Reserved.