Package fish.payara.nucleus.hotdeploy
Class ApplicationState
- java.lang.Object
-
- fish.payara.nucleus.hotdeploy.ApplicationState
-
public class ApplicationState extends Object
The Application deployment state includes application descriptor metadata, engines info and module info.- Author:
- Gaurav Gupta
-
-
Constructor Summary
Constructors Constructor Description ApplicationState(String name, File path, ExtendedDeploymentContext deploymentContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddProcessingContext(Class descriptor, Object processingContext)voidclose()Mark theApplicationStateas inactive and do the final cleanup.ApplicationInfogetApplicationInfo()Map<String,String>getClassesChanged()ExtendedDeploymentContextgetDeploymentContext()Map<String,Object>getDescriptorMetadata()List<EngineInfo>getEngineInfos()ModuleInfogetModuleInfo()<T> TgetModuleMetaData(Class<T> metadataType)StringgetName()FilegetPath()<P> PgetProcessingContext(Class descriptor, Class<P> _class)Optional<AnnotationProcessorState>getProcessingState(Object processingContext)Set<String>getSniffers()StringgetTarget()booleanisActive()booleanisClassChanged(Class clazz)Is the class modified in the IDE.booleanisClassChanged(String clazz)booleanisHotswap()booleanisInactive()voidpreDestroy()voidsetApplicationClassLoader(ClassLoader applicationClassLoader)voidsetApplicationInfo(ApplicationInfo applicationInfo)voidsetEngineInfos(List<EngineInfo> engineInfos)voidsetModuleInfo(ModuleInfo moduleInfo)voidsetSniffers(Collection<? extends Sniffer> sniffers)Sets the sniffers, If previous sniffers differs from current deployment sniffers then moduleInfo, and engineInfos cache staled.voidsetTarget(String target)booleanstart(DeployCommandParameters commandParams, ExtendedDeploymentContext newContext, Events events)Starts the Application state for new deployment by copying the cached metadata and properties to the newDeploymentContextinstance.voidstoreMetaData(ExtendedDeploymentContext deploymentContext)Store the transient info before clean up ofDeploymentContext#postDeployClean
-
-
-
Constructor Detail
-
ApplicationState
public ApplicationState(String name, File path, ExtendedDeploymentContext deploymentContext)
-
-
Method Detail
-
getPath
public File getPath()
-
getName
public String getName()
-
getTarget
public String getTarget()
-
setTarget
public void setTarget(String target)
-
getDeploymentContext
public ExtendedDeploymentContext getDeploymentContext()
-
getEngineInfos
public List<EngineInfo> getEngineInfos()
-
setEngineInfos
public void setEngineInfos(List<EngineInfo> engineInfos)
-
getModuleInfo
public ModuleInfo getModuleInfo()
-
setModuleInfo
public void setModuleInfo(ModuleInfo moduleInfo)
-
getApplicationInfo
public ApplicationInfo getApplicationInfo()
-
setApplicationInfo
public void setApplicationInfo(ApplicationInfo applicationInfo)
-
isActive
public boolean isActive()
-
isInactive
public boolean isInactive()
-
isHotswap
public boolean isHotswap()
-
setSniffers
public void setSniffers(Collection<? extends Sniffer> sniffers)
Sets the sniffers, If previous sniffers differs from current deployment sniffers then moduleInfo, and engineInfos cache staled.- Parameters:
sniffers-
-
start
public boolean start(DeployCommandParameters commandParams, ExtendedDeploymentContext newContext, Events events)
Starts the Application state for new deployment by copying the cached metadata and properties to the newDeploymentContextinstance.- Parameters:
commandParams-newContext-events-- Returns:
-
setApplicationClassLoader
public void setApplicationClassLoader(ClassLoader applicationClassLoader)
-
getProcessingState
public Optional<AnnotationProcessorState> getProcessingState(Object processingContext)
-
isClassChanged
public boolean isClassChanged(Class clazz)
Is the class modified in the IDE.- Parameters:
clazz-- Returns:
-
isClassChanged
public boolean isClassChanged(String clazz)
-
storeMetaData
public void storeMetaData(ExtendedDeploymentContext deploymentContext)
Store the transient info before clean up ofDeploymentContext#postDeployClean- Parameters:
deploymentContext-
-
getModuleMetaData
public <T> T getModuleMetaData(Class<T> metadataType)
-
close
public void close()
Mark theApplicationStateas inactive and do the final cleanup.
-
preDestroy
public void preDestroy()
-
-