@Transactional(readOnly=true) public class JobBean extends AbstractStatefulBean implements JobHandle, ProcessCallback
iQuery, iUpdate, modified, sec| Constructor and Description | 
|---|
JobBean()
default constructor 
 | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
activate()
Does almost nothing. 
 | 
JobStatus | 
attach(long id)  | 
void | 
cancelJob()
Marks a job for cancellation. 
 | 
protected void | 
checkAndRegister()  | 
void | 
close()
signals the end of the service lifecycle. 
 | 
protected void | 
errorIfInvalidState()  | 
Job | 
getJob()  | 
Class<? extends ServiceInterface> | 
getServiceInterface()  | 
boolean | 
jobError()
Returns true if the  
Job has thrown an error. | 
Timestamp | 
jobFinished()  | 
String | 
jobMessage()  | 
boolean | 
jobRunning()
 | 
JobStatus | 
jobStatus()  | 
void | 
passivate()
Does nothing. 
 | 
void | 
processCancelled(Process proc)  | 
void | 
processFinished(Process proc)  | 
String | 
setMessage(String message)
Sets the job's message string, and returns the previous value. 
 | 
void | 
setProcessManager(IProcessManager procMgr)
Process Manager Bean injector. 
 | 
String | 
setStatus(String status)
Updates the  
JobStatus for the current job. | 
String | 
setStatusAndMessage(String status,
                   String message)
Like  
JobHandle.setStatus(String) but also sets the message. | 
void | 
setTypesService(ITypes typesService)
Types service Bean injector. 
 | 
long | 
submit(Job newJob)
Submits a  
Job and returns its database id. | 
getBeanHelper, getCurrentEventContext, isModified, modified, selfConfigure, setQueryService, setSecuritySystem, setUpdateServiceclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetCurrentEventContextpublic Class<? extends ServiceInterface> getServiceInterface()
getServiceInterface in interface SelfConfigurableService@Transactional public void passivate()
passivate in interface StatefulServiceInterface@Transactional public void activate()
jobId is non-null, then
 this instance will need to handle re-loading on first
 access. (Previously it could not be done here, because the
 security system was not configured for transactions during
 JavaEE callbacks. This is no longer true.)activate in interface StatefulServiceInterface@Transactional(readOnly=true) public void close()
StatefulServiceInterfaceclose in interface StatefulServiceInterface@Transactional(readOnly=false) public long submit(Job newJob)
JobHandleJob and returns its database id. The only fields
 directly on status which are editable are message,
 scheduledFor and status. The latter two must be
 sensible.public JobStatus attach(long id)
public void setTypesService(ITypes typesService)
typesService - an ITypes.public void setProcessManager(IProcessManager procMgr)
procMgr - a ProcessManager.protected void errorIfInvalidState()
protected void checkAndRegister()
public Timestamp jobFinished()
jobFinished in interface JobHandleJob is not finished, otherwise the
         Timestamp for when it completed.public JobStatus jobStatus()
public String jobMessage()
jobMessage in interface JobHandlepublic boolean jobRunning()
JobHandlejobRunning in interface JobHandlepublic boolean jobError()
JobHandleJob has thrown an error.@Transactional(readOnly=false) public void cancelJob()
JobHandle@Transactional(readOnly=false) public String setStatus(String status)
JobHandleJobStatus for the current job. The previous status
 is returned as a string. If the status is JobHandle.CANCELLED, this
 method is equivalent to JobHandle.cancelJob().@Transactional(readOnly=false) public String setMessage(String message)
JobHandlesetMessage in interface JobHandle@Transactional(readOnly=false) public String setStatusAndMessage(String status, String message)
JobHandleJobHandle.setStatus(String) but also sets the message.setStatusAndMessage in interface JobHandlepublic void processCancelled(Process proc)
processCancelled in interface ProcessCallbackpublic void processFinished(Process proc)
processFinished in interface ProcessCallback
                
                
Version: 5.2.3-ice35-b22
Copyright © 2016 The University of Dundee & Open Microscopy Environment. All Rights Reserved.