ome.services.procs
Class ProcessManager.Work

java.lang.Object
  extended by ome.services.procs.ProcessManager.Work
All Implemented Interfaces:
Executor.Work
Enclosing class:
ProcessManager

public static class ProcessManager.Work
extends Object
implements Executor.Work

Task performed by the ProcessManager on each invocation of ExecutionThread.run().


Field Summary
protected  List<Processor> processors
          processors available for processing.
protected  Map<Long,Process> procMap
          Map of all active processes.
protected  SecuritySystem sec
          SecuritySystem in order to perform a secure save on the Job instance.
 
Constructor Summary
ProcessManager.Work(SecuritySystem sec, Processor... procs)
           
 
Method Summary
 String description()
          Returns a description of what this work will be doing for logging purposes.
 List<ome.model.jobs.Job> doWork(org.hibernate.Session session, ServiceFactory sf)
          Work method.
protected  ome.model.jobs.Job job(ServiceFactory sf, long id)
           
 void startProcess(ServiceFactory sf, long jobId)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

processors

protected final List<Processor> processors
processors available for processing. This array will never be null.


sec

protected final SecuritySystem sec
SecuritySystem in order to perform a secure save on the Job instance.


procMap

protected Map<Long,Process> procMap
Map of all active processes.

Constructor Detail

ProcessManager.Work

public ProcessManager.Work(SecuritySystem sec,
                           Processor... procs)
Method Detail

description

public String description()
Description copied from interface: Executor.Work
Returns a description of what this work will be doing for logging purposes.

Specified by:
description in interface Executor.Work

doWork

public List<ome.model.jobs.Job> doWork(org.hibernate.Session session,
                                       ServiceFactory sf)
Description copied from interface: Executor.Work
Work method. Must return all results coming from Hibernate via the Object return method.

Specified by:
doWork in interface Executor.Work
Parameters:
session - non null.
sf - non null.
Returns:
Any results which will be used by non-wrapped code.

startProcess

public void startProcess(ServiceFactory sf,
                         long jobId)

job

protected ome.model.jobs.Job job(ServiceFactory sf,
                                 long id)


OmeroJava Api

Version: 4.3.4-dbcbce5a-b4

Copyright © 2009 The University of Dundee. All Rights Reserved.