uk.ac.ncl.cs.instantsoap.job.impl
Class FileJob

java.lang.Object
  extended by uk.ac.ncl.cs.instantsoap.job.impl.FileJob
All Implemented Interfaces:
Job

public class FileJob
extends Object
implements Job

A Job that stores the result in files.

Author:
Louis, Matthew Pocock

Constructor Summary
FileJob(String directory)
           
 
Method Summary
 void delete()
          Delete any resources associated with with this job.
 Throwable getFailureReason()
          Get the reason for failure.
 InvocationState getInvocationState()
          Get the invocation state.
 Date getJobExecutionEndTime()
          Get the time the job ended to be executed.
 Date getJobExecutionStartTime()
          Get the time the job started to be executed.
 Date getJobSubmissionTime()
          Get the job submition time.
 Date getLastRetrieval()
          Get the last time the results where retrieved.
 Map<String,String> getResult()
          Get the results data.
 boolean isFailure()
          True if the job has resulted in failure, false otherwise.
 void setFailure(boolean failure)
          Set the job failure status.
 void setFailureReason(Throwable failureReason)
          Set the reason for failure.
 void setInvocationState(InvocationState state)
          Set the invocation state.
 void setJobExecutionEndTime(Date time)
          Set the job execution end time.
 void setJobExecutionStartTime(Date time)
          Set the job execution start time.
 void setJobSubmissionTime(Date time)
          Set the job submission time.
 void setLastRetrieval(Date time)
          Set the last time the results where retrieved.
 void setResut(Map<String,String> data)
          Set the result data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileJob

public FileJob(String directory)
Method Detail

delete

public void delete()
Description copied from interface: Job
Delete any resources associated with with this job.

Specified by:
delete in interface Job

isFailure

public boolean isFailure()
Description copied from interface: Job
True if the job has resulted in failure, false otherwise.

Specified by:
isFailure in interface Job
Returns:
the job failure status

setFailure

public void setFailure(boolean failure)
Description copied from interface: Job
Set the job failure status.

Specified by:
setFailure in interface Job
Parameters:
failure - the new failure status

setResut

public void setResut(Map<String,String> data)
              throws JobExecutionException
Description copied from interface: Job
Set the result data.

Specified by:
setResut in interface Job
Parameters:
data - the reults data Map
Throws:
JobExecutionException

getResult

public Map<String,String> getResult()
                             throws JobExecutionException
Description copied from interface: Job
Get the results data.

Specified by:
getResult in interface Job
Returns:
the results data
Throws:
JobExecutionException

setFailureReason

public void setFailureReason(Throwable failureReason)
                      throws JobExecutionException
Description copied from interface: Job
Set the reason for failure.

Specified by:
setFailureReason in interface Job
Parameters:
failureReason - the Throwable containing the failure reason
Throws:
JobExecutionException

getFailureReason

public Throwable getFailureReason()
                           throws JobExecutionException
Description copied from interface: Job
Get the reason for failure.

Specified by:
getFailureReason in interface Job
Returns:
the Throwable containing the failure reason
Throws:
JobExecutionException

getInvocationState

public InvocationState getInvocationState()
Description copied from interface: Job
Get the invocation state.

Specified by:
getInvocationState in interface Job
Returns:
the InvocationState

setInvocationState

public void setInvocationState(InvocationState state)
Description copied from interface: Job
Set the invocation state.

Specified by:
setInvocationState in interface Job
Parameters:
state - the new InvocationState

setJobSubmissionTime

public void setJobSubmissionTime(Date time)
Description copied from interface: Job
Set the job submission time.

Specified by:
setJobSubmissionTime in interface Job
Parameters:
time - the new Date for the job submission

getJobSubmissionTime

public Date getJobSubmissionTime()
Description copied from interface: Job
Get the job submition time.

Specified by:
getJobSubmissionTime in interface Job
Returns:
the Date capturing when the job was submitted

getJobExecutionStartTime

public Date getJobExecutionStartTime()
Description copied from interface: Job
Get the time the job started to be executed.

Specified by:
getJobExecutionStartTime in interface Job
Returns:
the Date capturing when the job started to be executed

setJobExecutionStartTime

public void setJobExecutionStartTime(Date time)
Description copied from interface: Job
Set the job execution start time.

Specified by:
setJobExecutionStartTime in interface Job
Parameters:
time - the new Date for the job execution

getJobExecutionEndTime

public Date getJobExecutionEndTime()
Description copied from interface: Job
Get the time the job ended to be executed.

Specified by:
getJobExecutionEndTime in interface Job
Returns:
the Date capturing when the job ended be executed

setJobExecutionEndTime

public void setJobExecutionEndTime(Date time)
Description copied from interface: Job
Set the job execution end time.

Specified by:
setJobExecutionEndTime in interface Job
Parameters:
time - the new Date for the job execution

setLastRetrieval

public void setLastRetrieval(Date time)
Description copied from interface: Job
Set the last time the results where retrieved.

Specified by:
setLastRetrieval in interface Job
Parameters:
time - the Date when the results where retrieved

getLastRetrieval

public Date getLastRetrieval()
Description copied from interface: Job
Get the last time the results where retrieved.

Specified by:
getLastRetrieval in interface Job
Returns:
the Date when the results where retrieved


Copyright © 2006-2008. All Rights Reserved.