|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.globus.ogsa.impl.core.service.ServicePropertiesImpl
org.globus.ogsa.impl.base.gram.client.GramJob
This class represents a simple gram job. It allows for submitting a job to a gatekeeper, canceling it, sending a signal command and registering and unregistering from callback.
| Field Summary | |
static ExtendedDateTimeType |
DEFAULT_TERMINATION_TIME
|
static int |
DEFAULT_TIMEOUT
|
protected int |
error
|
protected GrimProxyPolicyHandler |
grimPolicyHandler
|
protected java.lang.String |
notificationSinkID
|
protected NotificationSinkManager |
notificationSinkManager
|
protected org.ietf.jgss.GSSCredential |
proxy
|
protected ManagedJobServiceGridLocator |
serviceLocator
|
protected int |
status
|
| Constructor Summary | |
GramJob(org.ietf.jgss.GSSCredential proxy,
java.lang.String rsl)
Creates a gram job with specified rsl and user credentials. |
|
GramJob(java.lang.String rsl)
Creates a gram job with specified rsl with default user credentials. |
|
| Method Summary | |
void |
addListener(GramJobListener listener)
Add a listener to the GramJob. |
void |
addStderrPath(java.lang.String variableName,
java.lang.String path)
Adds a path in the stderr clause of the RSL. |
void |
addStdoutPath(java.lang.String variableName,
java.lang.String path)
Adds a path in the stdout clause of the RSL. |
void |
bind()
Registers a callback listener for this job. |
void |
cancel()
Cancels a job. |
void |
deliverNotification(ExtensibilityType message)
|
void |
destroy()
Precondition: isRequested() && !isDestroyed() Postcondition: isDestroyed() |
Authorization |
getAuthorization()
|
org.ietf.jgss.GSSCredential |
getCredentials()
Gets the credentials of this job. |
int |
getError()
Gets the error of the job. |
FaultType |
getFault()
Return information about the cause of a job failure (when getStatusAsString.equals(JobStateType._Failed)) |
boolean |
getGrimChecks()
|
HandleType |
getHandle()
Precondition: isRequested() |
GlobusURL |
getID()
Gets the job handle of this job. |
java.lang.String |
getIDAsString()
Gets the job handle of this job and returns it as a string representaion. |
java.lang.Integer |
getMessageProtectionType()
|
java.lang.String |
getRSL()
Gets the rsl of this job. |
GramJobAttributes |
getRSLAttributes()
Returns the current RSL of the job, that is the input RSL plus substitution definitions and references if any have been added via the corresponding methods, or the RSL of the submitted job if it is has been refreshed (which may features substituted values). |
static java.util.List |
getStartedJobs(java.lang.String factoryHandle)
|
static java.util.List |
getStartedJobs(java.lang.String factoryHandle,
org.ietf.jgss.GSSCredential proxy)
|
int |
getStatus()
Gets the current status of this job. |
java.lang.String |
getStatusAsString()
Get the status of the GramJob. |
static java.lang.String |
getStatusAsString(int status)
Convert the status of a GramJob from an integer to a string. |
static int |
getStatusStringAsInt(java.lang.String statusString)
|
boolean |
isDestroyed()
|
boolean |
isPersonal()
|
boolean |
isRequested()
Returns true if the job has been requested. |
void |
refreshRSLAttributes()
Gets submitted RSL from remote Managed Job Service. |
void |
refreshStatus()
Asks the job service for its state. |
void |
removeListener(GramJobListener listener)
Remove a listener from the GramJob. |
void |
request(java.lang.String contact)
Submits a job to the specified gatekeeper as an interactive job. |
void |
request(java.lang.String contact,
boolean batch)
Submits a job to the specified gatekeeper either as an interactive or batch job. |
void |
request(java.lang.String contact,
boolean batch,
boolean limitedDelegation)
Submits a job to the specified gatekeeper either as an interactive or batch job. |
void |
request(java.net.URL factoryHandle)
Submits a job to the specified gatekeeper as an interactive job. |
void |
request(java.net.URL factoryHandle,
boolean batch)
Submits a job to the specified gatekeeper either as an interactive or batch job. |
void |
request(java.net.URL factoryHandle,
boolean batch,
boolean limitedDelegation)
Submits a job to the specified gatekeeper either as an interactive or batch job. |
void |
setAuthorization(Authorization auth)
|
void |
setCredentials(org.ietf.jgss.GSSCredential newProxy)
Sets credentials of the job |
void |
setDryRun(boolean dryRun)
|
protected void |
setError(int code)
Sets the error code of the job. |
void |
setGrimChecks(boolean grimChecks)
|
void |
setHandle(java.lang.String GSH)
|
void |
setID(java.lang.String jobUrl)
Sets the job handle. |
void |
setMessageProtectionType(java.lang.Integer protectionType)
|
void |
setPersonal(boolean personal)
|
void |
setServiceDuration(java.util.Date duration)
|
void |
setServiceTerminationTime(java.util.Date dateTime)
|
protected void |
setStatus(int status)
Sets the status of the job. |
void |
setSubstitutionDefinition(java.lang.String substitutionName,
java.lang.String substitutionValue)
Sets substitution definition if exists or adds to RSL if does not. |
void |
setTimeOut(int timeout)
Set timeout for HTTP socket. |
int |
signal(int signal)
Sends a signal command to the job. |
int |
signal(int signal,
java.lang.String arg)
Sends a signal command to the job. |
void |
start()
|
java.lang.String |
toString()
Returns string representation of this job. |
void |
unbind()
Unregisters a callback listener for this job. |
| Methods inherited from class org.globus.ogsa.impl.core.service.ServicePropertiesImpl |
flush, flush, getPersistentProperty, getProperty, keySet, setPersistentProperty, setProperty |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.globus.ogsa.ServiceProperties |
flush, getPersistentProperty, getProperty, setPersistentProperty, setProperty |
| Field Detail |
public static final int DEFAULT_TIMEOUT
protected int status
protected int error
public static final ExtendedDateTimeType DEFAULT_TERMINATION_TIME
protected org.ietf.jgss.GSSCredential proxy
protected ManagedJobServiceGridLocator serviceLocator
protected NotificationSinkManager notificationSinkManager
protected java.lang.String notificationSinkID
protected GrimProxyPolicyHandler grimPolicyHandler
| Constructor Detail |
public GramJob(java.lang.String rsl)
rsl - resource specification string
public GramJob(org.ietf.jgss.GSSCredential proxy,
java.lang.String rsl)
proxy - user credentialsrsl - resource specification string| Method Detail |
public void addListener(GramJobListener listener)
listener - The object that wishes to receive status updates.org.globus.gram.GramJobListenerpublic void removeListener(GramJobListener listener)
listener - The object that wishes to stop receiving status updates.org.globus.gram.GramJobListenerpublic java.lang.String getRSL()
public org.ietf.jgss.GSSCredential getCredentials()
public void setCredentials(org.ietf.jgss.GSSCredential newProxy)
newProxy - user credentials
java.lang.IllegalArgumentException - if credentials are already set
public void setID(java.lang.String jobUrl)
throws java.net.MalformedURLException
jobUrl - job handle in form of url
java.net.MalformedURLException - if the job
handle is invalidpublic GlobusURL getID()
public java.lang.String getIDAsString()
public int getStatus()
protected void setStatus(int status)
status - status of the job
public void request(java.lang.String contact)
throws GramException,
org.ietf.jgss.GSSException
contact - the resource manager contact.
The contact can be specified in number of ways for 1.1.3 gatekeepers:
GramException - if error occurs during job submission.
org.ietf.jgss.GSSException - if user credentials are invalid.
public void request(java.lang.String contact,
boolean batch)
throws GramException,
org.ietf.jgss.GSSException
contact - the resource manager contact.batch - specifies if the job should be submitted as
a batch job.
GramException - if error occurs during job submission.
org.ietf.jgss.GSSException - if user credentials are invalid.for detailed resource manager
contact specification.
public void request(java.lang.String contact,
boolean batch,
boolean limitedDelegation)
throws GramException,
org.ietf.jgss.GSSException
contact - the resource manager contact.batch - specifies if the job should be submitted as
a batch job.limitedDelegation - true for limited delegation, false for
full delegation.
GramException - if error occurs during job submission.
org.ietf.jgss.GSSException - if user credentials are invalid.for detailed resource manager
contact specification.
public void request(java.net.URL factoryHandle)
throws GramException,
org.ietf.jgss.GSSException
factoryHandle - the handle to the job manager factory service
GramException - if error occurs during job submission.
org.ietf.jgss.GSSException - if user credentials are invalid.
public void request(java.net.URL factoryHandle,
boolean batch)
throws GramException,
org.ietf.jgss.GSSException
factoryHandle - the handle to the job manager factory servicebatch - specifies if the job should be submitted as
a batch job.
GramException - if error occurs during job submission.
org.ietf.jgss.GSSException - if user credentials are invalid.for detailed resource manager
contact specification.
public void request(java.net.URL factoryHandle,
boolean batch,
boolean limitedDelegation)
throws GramException,
org.ietf.jgss.GSSException
factoryHandle - the handle to the job manager factory servicebatch - specifies if the job should be submitted as
a batch job.limitedDelegation - true for limited delegation, false for
full delegation.
GramException - if error occurs during job submission.
org.ietf.jgss.GSSException - if user credentials are invalid.for detailed resource manager
contact specification.
public void setSubstitutionDefinition(java.lang.String substitutionName,
java.lang.String substitutionValue)
throws GramException
GramException
public void addStdoutPath(java.lang.String variableName,
java.lang.String path)
throws GramException
variableName - name of the variable which value is to be used
as the base URL of the complete path to addpath - path element to add to the substituted variable to form
the path to add
GramException
public void addStderrPath(java.lang.String variableName,
java.lang.String path)
throws GramException
variableName - name of the variable which value is to be used
as the base URL of the complete path to addpath - path element to add to the substituted variable to form
the path to add
GramException
public void setDryRun(boolean dryRun)
throws GramException
GramException
public GramJobAttributes getRSLAttributes()
throws GramException
GramException - if needs to parse an RSL string but cannotpublic boolean isRequested()
public void setPersonal(boolean personal)
public boolean isPersonal()
public void cancel()
throws GramException,
org.ietf.jgss.GSSException
GramException - if error occurs during job cancelation.
org.ietf.jgss.GSSException - if user credentials are invalid.
public void bind()
throws GramException,
org.ietf.jgss.GSSException
GramException - if error occurs during job registration.
org.ietf.jgss.GSSException - if user credentials are invalid.
public void unbind()
throws GramException,
org.ietf.jgss.GSSException
GramException - if error occurs during job unregistration.
org.ietf.jgss.GSSException - if user credentials are invalid.
public void destroy()
throws GramException
GramException - if error occurs during job service destruction.public boolean isDestroyed()
public void start()
throws GramException
GramException
public int signal(int signal,
java.lang.String arg)
throws GramException,
org.ietf.jgss.GSSException
arg - argument of signal
GramException - if error occurs during signalization.
org.ietf.jgss.GSSException - if user credentials are invalid.
public int signal(int signal)
throws GramException,
org.ietf.jgss.GSSException
GramException - if error occurs during signalization.
org.ietf.jgss.GSSException - if user credentials are invalid.protected void setError(int code)
code - error codepublic int getError()
public FaultType getFault()
getStatusAsString.equals(JobStateType._Failed))
public HandleType getHandle()
public void setHandle(java.lang.String GSH)
throws java.lang.Exception
java.lang.Exceptionpublic void setTimeOut(int timeout)
timeout - the timeout value, in milliseconds.public java.lang.String toString()
toString in class ServicePropertiesImplpublic java.lang.String getStatusAsString()
public static java.lang.String getStatusAsString(int status)
public static int getStatusStringAsInt(java.lang.String statusString)
public void deliverNotification(ExtensibilityType message)
public void refreshStatus()
throws java.lang.Exception
java.lang.Exception - if the service data cannot be fetched or
the job state not extracted from the data.
public void refreshRSLAttributes()
throws java.lang.Exception
getRSLAttributes afterwards.
java.lang.Exception
public static java.util.List getStartedJobs(java.lang.String factoryHandle)
throws java.lang.Exception
java.lang.Exception
public static java.util.List getStartedJobs(java.lang.String factoryHandle,
org.ietf.jgss.GSSCredential proxy)
throws java.lang.Exception
java.lang.Exceptionpublic void setAuthorization(Authorization auth)
public Authorization getAuthorization()
public void setGrimChecks(boolean grimChecks)
public boolean getGrimChecks()
public void setMessageProtectionType(java.lang.Integer protectionType)
public java.lang.Integer getMessageProtectionType()
public void setServiceDuration(java.util.Date duration)
duration - the duration after which the job service should be
destroyed. The hours and minutes will be used.public void setServiceTerminationTime(java.util.Date dateTime)
dateTime - the date/time desired for termination of this job service
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||