uk.ac.soton.ecs.iam.grid.comms.client
Interface JobConversation

All Superinterfaces:
Comparable<StorableInStateRepository>, Conversation, IdentifiableResource, JobResource, PolicyManagement, ResourceMetadata, Signallable, StorableInStateRepository, WSResourceLifetime

public interface JobConversation
extends WSResourceLifetime, Conversation, JobResource

A JobConversation represents a job on a remote machine. A job allows running a remote application, and has a number of DataConversations as its inputs and outputs.


Field Summary
static String IO_TYPE_INPUT
          Value for IO_TYPE_METADATA for job inputs.
static QName IO_TYPE_METADATA
          Name of EPR meta-data element indicating whether a stager is a job input or output.
static String IO_TYPE_OUTPUT
          Value for IO_TYPE_METADATA for job outputs.
static String JOB_RESOURCE_TYPE
          Deprecated. - use JobResource.JOB_RESOURCE_TYPE
 
Method Summary
 void addStagersFromJSDL(JobDescription jsdlJobDesc)
          Add each input or output in status to our internal cache.
 void addStagersFromStatus(JobStatus status)
          Add each input or output in status to our internal cache.
 DataConversation[] getInputs()
          Returns the job's input stagers, in order.
 DataConversation[] getOutputs()
          Returns the job's output stagers, in order.
 DataConversation input(String name)
          Get the named input conversation.
 DataConversation output(String name)
          Get the named output conversation.
 boolean stillActive()
          Tests whether the job is running (or queued).
 boolean stillActive(JobStatus status)
          Like stillActive(), but takes the status returned by checkJob as input instead of performing checkJob operation itself.
 
Methods inherited from interface uk.ac.soton.ecs.iam.grid.comms.client.Conversation
getService
 
Methods inherited from interface uk.ac.soton.ecs.iam.grid.comms.client.StorableInStateRepository
getDescription, getEndpointRef, getURL, setDescription
 
Methods inherited from interface java.lang.Comparable
compareTo
 
Methods inherited from interface uk.ac.soton.itinnovation.grid.comms.job.JobResource
cancelJob, checkJob, finishJob, getJSDL, startJob, submitJob, submitJobJSDL
 
Methods inherited from interface uk.ac.soton.itinnovation.grid.types.PolicyManagement
addPolicyRule, getPolicyRules, getValidRoles, removePolicyRule
 
Methods inherited from interface uk.ac.soton.itinnovation.grid.types.ResourceMetadata
getEPR, setLabel
 
Methods inherited from interface uk.ac.soton.itinnovation.grid.types.IdentifiableResource
getServiceMatchPattern
 
Methods inherited from interface uk.ac.soton.itinnovation.grid.types.Signallable
getAvailableSignals, signal
 

Field Detail

IO_TYPE_METADATA

static final QName IO_TYPE_METADATA
Name of EPR meta-data element indicating whether a stager is a job input or output.


IO_TYPE_INPUT

static final String IO_TYPE_INPUT
Value for IO_TYPE_METADATA for job inputs.

See Also:
Constant Field Values

IO_TYPE_OUTPUT

static final String IO_TYPE_OUTPUT
Value for IO_TYPE_METADATA for job outputs.

See Also:
Constant Field Values

JOB_RESOURCE_TYPE

@Deprecated
static final String JOB_RESOURCE_TYPE
Deprecated. - use JobResource.JOB_RESOURCE_TYPE
See Also:
Constant Field Values
Method Detail

stillActive

boolean stillActive()
                    throws RemoteException
Tests whether the job is running (or queued). This should be polled from time to time to discover when the job is complete. This is a convenience wrapper around the JobResource.checkJob() method.

Returns:
true if polling should continue
Throws:
RemoteException

stillActive

boolean stillActive(JobStatus status)
Like stillActive(), but takes the status returned by checkJob as input instead of performing checkJob operation itself.


getInputs

DataConversation[] getInputs()
                             throws RemoteException
Returns the job's input stagers, in order. Upload data to these stagers before starting the job.

Throws:
RemoteException

getOutputs

DataConversation[] getOutputs()
                              throws RemoteException
Returns the job's output stagers, in order. Download data from these stagers once checkJob() returns a status of "job-terminated".

Throws:
RemoteException

input

DataConversation input(String name)
                       throws RemoteException,
                              NoSuchConversation
Get the named input conversation. This may invoke checkJob() if the inputs are not currently known.

Returns:
the input stager with the given name
Throws:
NoSuchConversation - if no stager with this name is known
RemoteException

output

DataConversation output(String name)
                        throws RemoteException,
                               NoSuchConversation
Get the named output conversation. This may invoke checkJob() if the outputs are not currently known.

Returns:
the output stager with the given name
Throws:
NoSuchConversation - if no stager with this name is known
RemoteException

addStagersFromStatus

void addStagersFromStatus(JobStatus status)
Add each input or output in status to our internal cache. This saves having to call checkData() later to get them.


addStagersFromJSDL

void addStagersFromJSDL(JobDescription jsdlJobDesc)
Add each input or output in status to our internal cache. This saves having to call checkData() later to get them.



Copyright © 2001-2008 University of Southampton IT Innovation Centre. All Rights Reserved.