public class TavernaRunManager extends UnicastRemoteObject implements RemoteRunFactory, RunAccounting, WorkerFactory
LocalWorker
,
Serialized FormModifier and Type | Field and Description |
---|---|
static String |
interactionFeedPath |
static String |
interactionHost |
static String |
interactionPort |
static String |
interactionWebdavPath |
ref
Constructor and Description |
---|
TavernaRunManager(String command)
An RMI-enabled factory for runs.
|
Modifier and Type | Method and Description |
---|---|
int |
countOperatingRuns()
Gets a count of the number of workflow runs
that this factor knows about that are in the
Operating state. |
static void |
main(String[] args) |
RemoteSingleRun |
make(byte[] workflow,
String creator,
UsageRecordReceiver urReceiver,
UUID id)
Makes a workflow run that will process a particular workflow document.
|
Worker |
makeInstance()
Create an instance of the low-level worker class.
|
void |
runCeased()
Logs that a run has finished executing.
|
void |
runStarted()
Logs that a run has started executing.
|
void |
setInteractionServiceDetails(String host,
String port,
String webdavPath,
String feedPath)
Configures the details to use when setting up the workflow run's
connnection to the interaction feed.
|
void |
shutdown()
Asks this factory to unregister itself from the registry and cease
operation.
|
protected Element |
unwrapWorkflow(Document containerDocument)
How to get the actual workflow document from the XML document that it is
contained in.
|
clone, exportObject, exportObject, exportObject, unexportObject
getClientHost, getLog, setLog
public static String interactionHost
public static String interactionPort
public static String interactionWebdavPath
public static String interactionFeedPath
public TavernaRunManager(String command) throws RemoteException
command
- What command to call to actually run a run.RemoteException
- If anything goes wrong during creation of the instance.protected Element unwrapWorkflow(Document containerDocument)
containerDocument
- The document sent from the web interface.public RemoteSingleRun make(byte[] workflow, String creator, UsageRecordReceiver urReceiver, UUID id) throws RemoteException
RemoteRunFactory
make
in interface RemoteRunFactory
workflow
- The (serialised) workflow to instantiate as a run.creator
- Who is this run created for?urReceiver
- Where to write any usage records. May be null to
cause them to not be written.id
- The UUID of the run to use, or null if the execution
engine is to manufacture a new one for itself.RemoteException
- If anything goes wrong with the communication.public void shutdown()
RemoteRunFactory
shutdown
in interface RemoteRunFactory
public static void main(String[] args) throws Exception
args
- The arguments from the command line invocation.Exception
- If we can't connect to the RMI registry, or if we can't read
the workflow, or if we can't build the worker instance, or
register it. Also if the arguments are wrong.public void setInteractionServiceDetails(String host, String port, String webdavPath, String feedPath) throws RemoteException
RemoteRunFactory
setInteractionServiceDetails
in interface RemoteRunFactory
host
- The host where the feed is located.port
- The port where the feed is located.webdavPath
- The path used for pushing web pages into the feed.feedPath
- The path used for reading and writing notifications on the
feed.RemoteException
- If anything goes wrong with the communication.public int countOperatingRuns()
RemoteRunFactory
Operating
state.countOperatingRuns
in interface RemoteRunFactory
public void runStarted()
RunAccounting
runStarted
in interface RunAccounting
public void runCeased()
RunAccounting
runCeased
in interface RunAccounting
public Worker makeInstance() throws Exception
WorkerFactory
makeInstance
in interface WorkerFactory
Exception
- If anything goes wrong.Copyright © 2015–2018 The Apache Software Foundation. All rights reserved.