ome.services.util
Class ExecutionThread

java.lang.Object
  extended by ome.services.util.ExecutionThread
All Implemented Interfaces:
Runnable
Direct Known Subclasses:
FullTextThread, PixelDataThread, ProcessManager

public abstract class ExecutionThread
extends Object
implements Runnable

Thread which can be started and will appropriately acquire a session, then use the Executor to complete its work.

Since:
3.0-Beta3
Author:
Josh Moore, josh at glencoesoftware.com

Field Summary
protected  Executor executor
           
protected  SessionManager manager
           
protected  Principal principal
           
protected  Executor.Work work
           
 
Constructor Summary
ExecutionThread(SessionManager manager, Executor executor, Executor.Work work, Principal principal)
          Main constructor.
 
Method Summary
abstract  void doRun()
           
 Principal getPrincipal()
           
 void run()
          Initializes the Session for this Thread if necessary, then calls doRun().
protected  void sessionInit()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

manager

protected final SessionManager manager

executor

protected final Executor executor

work

protected final Executor.Work work

principal

protected final Principal principal
Constructor Detail

ExecutionThread

public ExecutionThread(SessionManager manager,
                       Executor executor,
                       Executor.Work work,
                       Principal principal)
Main constructor. No arguments can be null.

Method Detail

run

public final void run()
Initializes the Session for this Thread if necessary, then calls doRun().

Specified by:
run in interface Runnable

getPrincipal

public final Principal getPrincipal()

doRun

public abstract void doRun()

sessionInit

protected final void sessionInit()


OmeroJava Api

Version: 4.3.3-00d1137e-b2894

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