Class ProjectLifecycleFactory<T extends ProjectLifecycle>
- java.lang.Object
- 
- com.inductiveautomation.ignition.common.lifecycle.AbstractLifecycle
- 
- com.inductiveautomation.ignition.gateway.project.ProjectLifecycleFactory<T>
 
 
- 
 public abstract class ProjectLifecycleFactory<T extends ProjectLifecycle> extends AbstractLifecycle 
- 
- 
Field SummaryFields Modifier and Type Field Description static java.util.function.Predicate<RuntimeProject>PROJECT_IS_RUNNABLE
 - 
Constructor SummaryConstructors Constructor Description ProjectLifecycleFactory(ProjectManagerBase projectManager)
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract TcreateProjectLifecycle(RuntimeProject project)Create an instance ofProjectLifecyclethat can manage runtime and lifecycle forproject.java.util.Optional<T>getLifecycle(java.lang.String projectName)Get theProjectLifecycleforprojectName, if it exists.com.google.common.collect.ImmutableList<T>getLifecycles()Get an immutable copy of the currentProjectLifecycles.java.util.function.Predicate<RuntimeProject>getProjectFilter()Return aPredicatethat indicates whether a project should have aProjectLifecyclecreated for it.protected abstract ResourceFiltergetResourceFilter()Get theResourceFilterto apply when getting matching resources this lifecycle is interested in.protected voidonShutdown()protected voidonStartup()voidrestartAll()We may need to restart all lifecycles of a type (such as scripting) if a module is installed, restarted or uninstalled.- 
Methods inherited from class com.inductiveautomation.ignition.common.lifecycle.AbstractLifecycleisRunning, shutdown, startup
 
- 
 
- 
- 
- 
Field Detail- 
PROJECT_IS_RUNNABLEpublic static final java.util.function.Predicate<RuntimeProject> PROJECT_IS_RUNNABLE 
 
- 
 - 
Constructor Detail- 
ProjectLifecycleFactorypublic ProjectLifecycleFactory(ProjectManagerBase projectManager) 
 
- 
 - 
Method Detail- 
onStartupprotected final void onStartup() - Specified by:
- onStartupin class- AbstractLifecycle
 
 - 
onShutdownprotected final void onShutdown() - Specified by:
- onShutdownin class- AbstractLifecycle
 
 - 
getLifecyclepublic java.util.Optional<T> getLifecycle(java.lang.String projectName) Get theProjectLifecycleforprojectName, if it exists.- Parameters:
- projectName- the project name the lifecycle belongs to.
- Returns:
- the ProjectLifecycleforprojectName, if it exists.
 
 - 
getLifecyclespublic final com.google.common.collect.ImmutableList<T> getLifecycles() Get an immutable copy of the currentProjectLifecycles.- Returns:
- an immutable copy of the current ProjectLifecycles.
 
 - 
createProjectLifecyclepublic abstract T createProjectLifecycle(RuntimeProject project) Create an instance ofProjectLifecyclethat can manage runtime and lifecycle forproject.- Parameters:
- project- the- RuntimeProjectthat will be run.
- Returns:
- a ProjectLifecyclethat can manage runtime and lifecycle forproject.
 
 - 
restartAllpublic void restartAll() We may need to restart all lifecycles of a type (such as scripting) if a module is installed, restarted or uninstalled. Most LifecycleFactories will not override this.
 - 
getResourceFilterprotected abstract ResourceFilter getResourceFilter() Get theResourceFilterto apply when getting matching resources this lifecycle is interested in.- Returns:
- the ResourceFilterto apply when matching resources this lifecycle is interested in.
 
 - 
getProjectFilterpublic java.util.function.Predicate<RuntimeProject> getProjectFilter() Return aPredicatethat indicates whether a project should have aProjectLifecyclecreated for it.For example, if the project doesn't contain any resources of a certain type then this predicate could return falseto avoid creating a lifecycle that doesn't actually have any resources to run.Should resources of an interesting type later get added the machinery of ProjectLifecycleFactoryensures a lifecycle will have a chance to be created at that time.- Returns:
- a Predicatethat indicates whether a project should have aProjectLifecyclecreated for it.
 
 
- 
 
-