com.bea.p13n.jobmanager
Interface JobContext


public interface JobContext

Holds information about a job and an implementation of this is passed to the work manager to execute. Once executed it calls the Job's executeWork method passing in it self.


Method Summary
 String getApplicationName()
          Returns the application name in which the encapsulated job is executed.
 String getClusterName()
          Returns the cluster name in which the encapsulated job is executed.
 JobManager.JOB_STATUS getCompletedStatus()
          Returns the job status
 String getId()
          Returns the job's id.
 Job getJob()
          Returns the job object this context is or is going to execute.
 JobDefinition getJobDefinition()
          Returns the encapsulated job's definition (configuration information)
 Map<String,String> getParameters()
          Returns the job's parameters.
 String getServerName()
          Returns the server name on which the encapsulated job is executed.
 javax.servlet.ServletContext getServletContext()
          If this job is running in the context of a web application then this will return a servlet context for that web application.
 String getWebApplicationName()
          Returns web application name if the encapsulated job is executed in the web app scope, otherwise returns null.
 boolean isCanceled()
          Indicates whether the job is cancelled or not.
 

Method Detail

getJob

Job getJob()
Returns the job object this context is or is going to execute.

Returns
The job.

getServletContext

javax.servlet.ServletContext getServletContext()
If this job is running in the context of a web application then this will return a servlet context for that web application.

Returns
The current servlet context if in web app scope or null.

getCompletedStatus

JobManager.JOB_STATUS getCompletedStatus()
Returns the job status

Returns
job status

getParameters

Map<String,String> getParameters()
Returns the job's parameters.

Returns
job's parameters

getApplicationName

String getApplicationName()
Returns the application name in which the encapsulated job is executed.

Returns
application name.

getClusterName

String getClusterName()
Returns the cluster name in which the encapsulated job is executed.

Returns
The cluster name.

getWebApplicationName

String getWebApplicationName()
Returns web application name if the encapsulated job is executed in the web app scope, otherwise returns null.

Returns
The web application name or null.

getServerName

String getServerName()
Returns the server name on which the encapsulated job is executed.

Returns
The server name.

getJobDefinition

JobDefinition getJobDefinition()
Returns the encapsulated job's definition (configuration information)

Returns
The job definition.

getId

String getId()
Returns the job's id.

Returns
job's id.

isCanceled

boolean isCanceled()
Indicates whether the job is cancelled or not.

Returns
true if the job is cancelled otherwise false.


Copyright © 2011, Oracle. All rights reserved.