ome.services.licenses.tasks
Class Run

java.lang.Object
  extended by ome.util.tasks.Run
      extended by ome.services.licenses.tasks.Run

public class Run
extends Run

Command-line adapter which can run any task. ServiceFactory and Task configuration can be specified as arguments in the form "key=value". The only mandatory argument for all tasks is the task name: java Run task=org.example.MyTask However a search for tasks will also be performed under "ome.util.tasks". E.g. java Run task=admin.AddUserTask resolves to ome.util.tasks.admin.AddUserTask. Use blitz=true to configure the task for blitz.

Since:
3.0-RC1
Author:
Josh Moore, josh.moore at gmx.de
See Also:
Configuration, Task

Field Summary
 
Fields inherited from class ome.util.tasks.Run
opts, task
 
Constructor Summary
Run(Config config)
          Passes the Configuration-subclass instance (see Config) to the Run.Run(Configuration) constructor.
 
Method Summary
protected  void acquireLicense()
           
protected  void cleanup()
          Releases a license during Run.cleanup()
protected  ServiceFactory getServiceFactory()
           
static void main(String[] args)
          Parses the command line into a Properties instance which gets passed to Configuration.
protected  void releaseLicense()
           
protected  void setup()
          Acquires a license during Run.setup()
 
Methods inherited from class ome.util.tasks.Run
getProperties, parseArgs, readStdin, run
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Run

public Run(Config config)
Passes the Configuration-subclass instance (see Config) to the Run.Run(Configuration) constructor.

Parameters:
config -
Method Detail

main

public static void main(String[] args)
Parses the command line into a Properties instance which gets passed to Configuration. Configuration.createTask() is called and the returned Task instance is run.


setup

protected void setup()
Acquires a license during Run.setup()

Overrides:
setup in class Run

cleanup

protected void cleanup()
Releases a license during Run.cleanup()

Overrides:
cleanup in class Run

acquireLicense

protected void acquireLicense()

releaseLicense

protected void releaseLicense()

getServiceFactory

protected ServiceFactory getServiceFactory()


OmeroJava Api

Version: Beta-4.1.1-r5927-b91

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