@ManagedResource(objectName="Taverna:group=Server-3.1.0,name=RunFactory", description="The factory for a user-specific forked run.") public class IdAwareForkRunFactory extends AbstractRemoteRunFactory implements ConfigurableRunFactory
Modifier and Type | Class and Description |
---|---|
static interface |
IdAwareForkRunFactory.MetaFactory
How construction of factories is actually done.
|
SECURITY_POLICY_FILE
log, runDB, state
Constructor and Description |
---|
IdAwareForkRunFactory()
Create a factory for remote runs that works by forking off a subprocess.
|
Modifier and Type | Method and Description |
---|---|
protected void |
finalize() |
String[] |
getFactoryProcessMapping()
What factory process to use for a particular user?
|
String |
getFactoryProcessName()
What is the RMI ID of the factory process?
|
Integer |
getLastExitCode()
What was the last observed exit code?
|
int |
getLastStartupCheckCount()
How long did the last subprocess startup take?
|
protected RemoteSingleRun |
getRealRun(UsernamePrincipal creator,
Workflow workflow,
UUID id)
Gets the RMI connector for a new run.
|
void |
killFactories()
Destroys the subprocess that manufactures runs.
|
protected int |
operatingCount()
Count the number of operating runs.
|
protected void |
reinitFactory()
Drop any current references to the run factory subprocess and kill it
off.
|
void |
setIdMapper(LocalIdentityMapper mapper) |
void |
setPasswordSource(String passwordSource) |
create, getMasterEventFeed, getSupportedListenerTypes, getTheRegistry, initInteractionDetails, launchSubprocess, makeListener, makeURReciver, reinitRegistry, serializeWorkflow
getCurrentRunNames, getDefaultLifetime, getExecuteWorkflowScript, getExtraArguments, getGenerateProvenance, getJavaBinary, getMaxRuns, getOperatingCount, getOperatingLimit, getPasswordFile, getRegistryHost, getRegistryPort, getRmiRegistryJar, getServerForkerJar, getServerWorkerJar, getSleepTime, getTotalRuns, getWaitSeconds, incrementRunCount, isAllowingRunsToStart, setDefaultLifetime, setExecuteWorkflowScript, setExtraArguments, setGenerateProvenance, setJavaBinary, setMaxRuns, setOperatingLimit, setPasswordFile, setRegistryHost, setRegistryPort, setRmiRegistryJar, setServerForkerJar, setServerWorkerJar, setSleepTime, setWaitSeconds
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getCurrentRunNames, getDefaultLifetime, getExecuteWorkflowScript, getExtraArguments, getGenerateProvenance, getJavaBinary, getMaxRuns, getOperatingCount, getOperatingLimit, getPasswordFile, getRegistryHost, getRegistryPort, getRmiRegistryJar, getServerForkerJar, getServerWorkerJar, getSleepTime, getTotalRuns, getWaitSeconds, setDefaultLifetime, setExecuteWorkflowScript, setExtraArguments, setGenerateProvenance, setJavaBinary, setMaxRuns, setOperatingLimit, setPasswordFile, setRegistryHost, setRegistryPort, setRmiRegistryJar, setServerForkerJar, setServerWorkerJar, setSleepTime, setWaitSeconds
create, isAllowingRunsToStart
isAllowingRunsToStart
public IdAwareForkRunFactory() throws JAXBException
JAXBException
- Shouldn't happen.protected void reinitFactory()
RunFactoryConfiguration
reinitFactory
in class RunFactoryConfiguration
@ManagedAttribute(description="How many checks were done for the worker process the last time a spawn was tried.", currencyTimeLimit=60) public int getLastStartupCheckCount()
ConfigurableRunFactory
getLastStartupCheckCount
in interface ConfigurableRunFactory
getLastStartupCheckCount
in class RunFactoryConfiguration
@ManagedAttribute(description="What was the exit code from the last time the factory subprocess was killed?") public Integer getLastExitCode()
ConfigurableRunFactory
getLastExitCode
in interface ConfigurableRunFactory
getLastExitCode
in class RunFactoryConfiguration
@ManagedAttribute(description="The mapping of user names to RMI factory IDs.", currencyTimeLimit=60) public String[] getFactoryProcessMapping()
ConfigurableRunFactory
getFactoryProcessMapping
in interface ConfigurableRunFactory
getFactoryProcessMapping
in class RunFactoryConfiguration
@PreDestroy public void killFactories()
protected void finalize() throws Throwable
@Autowired public void setIdMapper(LocalIdentityMapper mapper)
protected RemoteSingleRun getRealRun(UsernamePrincipal creator, Workflow workflow, UUID id) throws Exception
AbstractRemoteRunFactory
getRealRun
in class AbstractRemoteRunFactory
creator
- Who is creating the workflow run.workflow
- What workflow are they instantiating.id
- The identity token for the run, newly minted.Exception
- Just about anything can go wrong...@Value(value="${secureForkPasswordFile}") public void setPasswordSource(String passwordSource)
public String getFactoryProcessName()
ConfigurableRunFactory
getFactoryProcessName
in interface ConfigurableRunFactory
getFactoryProcessName
in class RunFactoryConfiguration
protected int operatingCount() throws Exception
RunFactoryConfiguration
operatingCount
in class RunFactoryConfiguration
Exception
Copyright © 2015–2018 The Apache Software Foundation. All rights reserved.