@ManagedResource(objectName="Taverna:group=Server-3.1.0,name=Factory", description="The factory for runs") public abstract class AbstractRemoteRunFactory extends RunFactoryConfiguration implements ListenerFactory, RunFactory, FactoryBean
Modifier and Type | Field and Description |
---|---|
static String |
SECURITY_POLICY_FILE
The name of the resource that describes the default security policy to
install.
|
log, runDB, state
Constructor and Description |
---|
AbstractRemoteRunFactory()
Set up the run expiry management engine.
|
Modifier and Type | Method and Description |
---|---|
TavernaRun |
create(UsernamePrincipal creator,
Workflow workflow)
Make a Taverna Server workflow run that is bound to a particular user
(the "creator") and able to run a particular workflow.
|
EventDAO |
getMasterEventFeed() |
protected abstract RemoteSingleRun |
getRealRun(UsernamePrincipal creator,
Workflow workflow,
UUID id)
Gets the RMI connector for a new run.
|
List<String> |
getSupportedListenerTypes()
What types of listener are supported? Note that we assume that the list
of types is the same for all users and all workflow instances.
|
protected Registry |
getTheRegistry() |
protected void |
initInteractionDetails(RemoteRunFactory factory) |
protected static Process |
launchSubprocess(ProcessBuilder b) |
Listener |
makeListener(TavernaRun run,
String listenerType,
String configuration)
Make an event listener.
|
protected UsageRecordReceiver |
makeURReciver(UsernamePrincipal creator)
Make a Remote object that can act as a consumer for usage records.
|
protected void |
reinitRegistry()
Drop any current references to the registry of runs, and kill off that
process.
|
protected byte[] |
serializeWorkflow(Workflow workflow)
How to convert a wrapped workflow into XML.
|
getCurrentRunNames, getDefaultLifetime, getExecuteWorkflowScript, getExtraArguments, getFactoryProcessMapping, getFactoryProcessName, getGenerateProvenance, getJavaBinary, getLastExitCode, getLastStartupCheckCount, getMaxRuns, getOperatingCount, getOperatingLimit, getPasswordFile, getRegistryHost, getRegistryPort, getRmiRegistryJar, getServerForkerJar, getServerWorkerJar, getSleepTime, getTotalRuns, getWaitSeconds, incrementRunCount, isAllowingRunsToStart, operatingCount, reinitFactory, setDefaultLifetime, setExecuteWorkflowScript, setExtraArguments, setGenerateProvenance, setJavaBinary, setMaxRuns, setOperatingLimit, setPasswordFile, setRegistryHost, setRegistryPort, setRmiRegistryJar, setServerForkerJar, setServerWorkerJar, setSleepTime, setWaitSeconds
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isAllowingRunsToStart
isAllowingRunsToStart
public static final String SECURITY_POLICY_FILE
public AbstractRemoteRunFactory() throws JAXBException
JAXBException
protected void reinitRegistry()
RunFactoryConfiguration
reinitRegistry
in class RunFactoryConfiguration
protected void initInteractionDetails(RemoteRunFactory factory) throws RemoteException
RemoteException
protected static final Process launchSubprocess(ProcessBuilder b) throws IOException
IOException
protected Registry getTheRegistry()
public List<String> getSupportedListenerTypes()
ListenerFactory
getSupportedListenerTypes
in interface ListenerFactory
public Listener makeListener(TavernaRun run, String listenerType, String configuration) throws NoListenerException
ListenerFactory
makeListener
in interface ListenerFactory
run
- The workflow instance to attach the event listener to.listenerType
- The type of event listener to create. Must be one of the
strings returned by ListenerFactory.getSupportedListenerTypes()
.configuration
- A configuration document to pass to the listener.NoListenerException
- If the listenerType is unrecognized or the
configuration is bad in some way.public TavernaRun create(UsernamePrincipal creator, Workflow workflow) throws NoCreateException
RunFactory
create
in interface RunFactory
creator
- The user creating the workflow instance.workflow
- The workflow to instantiateNoCreateException
- On failure.protected abstract RemoteSingleRun getRealRun(UsernamePrincipal creator, Workflow workflow, UUID id) throws Exception
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...protected byte[] serializeWorkflow(Workflow workflow) throws JAXBException
workflow
- The wrapped workflow.JAXBException
- If serialization fails.protected UsageRecordReceiver makeURReciver(UsernamePrincipal creator)
creator
- public EventDAO getMasterEventFeed()
getMasterEventFeed
in interface FactoryBean
Copyright © 2015–2018 The Apache Software Foundation. All rights reserved.