@Service @Singleton public class ApplicationLifecycle extends Object implements Deployment, org.glassfish.hk2.api.PostConstruct
| Modifier and Type | Class and Description |
|---|---|
class |
ApplicationLifecycle.DeploymentContextBuidlerImpl |
Deployment.DeploymentContextBuilder| Modifier and Type | Field and Description |
|---|---|
protected Applications |
applications |
ApplicationRegistry |
appRegistry |
protected DeploymentLifecycleProbeProvider |
deploymentLifecycleProbeProvider |
protected Domain |
domain |
protected Logger |
logger |
protected SnifferManagerImpl |
snifferManager |
AFTER_APPLICATION_CLASSLOADER_CREATION, AFTER_DEPLOYMENT_CLASSLOADER_CREATION, ALL_APPLICATIONS_PROCESSED, APPLICATION_CLEANED, APPLICATION_DISABLED, APPLICATION_LOADED, APPLICATION_PREPARED, APPLICATION_STARTED, APPLICATION_STOPPED, APPLICATION_UNLOADED, DEPLOYMENT_BEFORE_CLASSLOADER_CREATION, DEPLOYMENT_FAILURE, DEPLOYMENT_FAILURE_NAME, DEPLOYMENT_START, DEPLOYMENT_SUCCESS, INITIAL_CONTEXT_CREATED, MODULE_CLEANED, MODULE_LOADED, MODULE_PREPARED, MODULE_STARTED, MODULE_STOPPED, MODULE_UNLOADED, UNDEPLOYMENT_FAILURE, UNDEPLOYMENT_START, UNDEPLOYMENT_SUCCESS, UNDEPLOYMENT_VALIDATION| Constructor and Description |
|---|
ApplicationLifecycle() |
@Inject protected SnifferManagerImpl snifferManager
@Inject public ApplicationRegistry appRegistry
@Inject protected Applications applications
@Inject protected Domain domain
protected Logger logger
protected DeploymentLifecycleProbeProvider deploymentLifecycleProbeProvider
protected <T extends Container,U extends ApplicationContainer> Deployer<T,U> getDeployer(EngineInfo<T,U> engineInfo)
public void postConstruct()
postConstruct in interface org.glassfish.hk2.api.PostConstructpublic ArchiveHandler getArchiveHandler(ReadableArchive archive) throws IOException
getArchiveHandler in interface Deploymentarchive - the archive to find the handler forIOException - when an error occurpublic ArchiveHandler getArchiveHandler(ReadableArchive archive, String type) throws IOException
getArchiveHandler in interface Deploymentarchive - the archive to find the handler fortype - the type of the archiveIOException - when an error occurpublic ApplicationInfo deploy(ExtendedDeploymentContext context)
deploy in interface Deploymentpublic ApplicationInfo deploy(Collection<? extends Sniffer> sniffers, ExtendedDeploymentContext context)
deploy in interface Deploymentpublic org.glassfish.hk2.classmodel.reflect.Types getDeployableTypes(DeploymentContext context) throws IOException
DeploymentgetDeployableTypes in interface Deploymentcontext - deployment contextIOException - if the scanning fails due to an I/O exceptionpublic boolean suspend(String appName)
appName - the registration application IDpublic boolean resume(String appName)
appName - the registration application IDpublic List<EngineInfo> setupContainerInfos(DeploymentContext context) throws Exception
setupContainerInfos in interface DeploymentExceptionpublic Collection<? extends Sniffer> getSniffers(ArchiveHandler handler, Collection<? extends Sniffer> sniffers, DeploymentContext context)
getSniffers in interface Deploymentpublic List<EngineInfo> setupContainerInfos(ArchiveHandler handler, Collection<? extends Sniffer> sniffers, DeploymentContext context) throws Exception
setupContainerInfos in interface DeploymentExceptionpublic ModuleInfo prepareModule(List<EngineInfo> sortedEngineInfos, String moduleName, DeploymentContext context, ProgressTracker tracker) throws Exception
prepareModule in interface DeploymentExceptionprotected Collection<EngineInfo> setupContainer(Sniffer sniffer, Logger logger, DeploymentContext context)
protected boolean startContainers(Collection<EngineInfo> containersInfo, Logger logger, DeploymentContext context)
protected void stopContainers(EngineInfo[] ctrInfos, Logger logger)
public ApplicationInfo unload(ApplicationInfo info, ExtendedDeploymentContext context)
unload in interface Deploymentpublic void undeploy(String appName, ExtendedDeploymentContext context)
undeploy in interface Deploymentpublic org.jvnet.hk2.config.Transaction prepareAppConfigChanges(DeploymentContext context) throws org.jvnet.hk2.config.TransactionFailure
prepareAppConfigChanges in interface Deploymentorg.jvnet.hk2.config.TransactionFailurepublic void registerAppInDomainXML(ApplicationInfo applicationInfo, DeploymentContext context, org.jvnet.hk2.config.Transaction t) throws org.jvnet.hk2.config.TransactionFailure
registerAppInDomainXML in interface Deploymentorg.jvnet.hk2.config.TransactionFailurepublic void registerAppInDomainXML(ApplicationInfo applicationInfo, DeploymentContext context, org.jvnet.hk2.config.Transaction t, boolean appRefOnly) throws org.jvnet.hk2.config.TransactionFailure
registerAppInDomainXML in interface Deploymentorg.jvnet.hk2.config.TransactionFailurepublic void registerTenantWithAppInDomainXML(String appName, ExtendedDeploymentContext context) throws org.jvnet.hk2.config.TransactionFailure
registerTenantWithAppInDomainXML in interface Deploymentorg.jvnet.hk2.config.TransactionFailurepublic void unregisterTenantWithAppInDomainXML(String appName, String tenantName) throws org.jvnet.hk2.config.TransactionFailure, org.jvnet.hk2.config.RetryableException
unregisterTenantWithAppInDomainXML in interface Deploymentorg.jvnet.hk2.config.TransactionFailureorg.jvnet.hk2.config.RetryableExceptionpublic void unregisterAppFromDomainXML(String appName, String target) throws org.jvnet.hk2.config.TransactionFailure
unregisterAppFromDomainXML in interface Deploymentorg.jvnet.hk2.config.TransactionFailurepublic void unregisterAppFromDomainXML(String appName, String tgt, boolean appRefOnly) throws org.jvnet.hk2.config.TransactionFailure
unregisterAppFromDomainXML in interface Deploymentorg.jvnet.hk2.config.TransactionFailurepublic void updateAppEnabledAttributeInDomainXML(String appName, String target, boolean enabled) throws org.jvnet.hk2.config.TransactionFailure
updateAppEnabledAttributeInDomainXML in interface Deploymentorg.jvnet.hk2.config.TransactionFailurepublic boolean isRegistered(String appName)
isRegistered in interface Deploymentpublic ApplicationInfo get(String appName)
get in interface Deploymentpublic String getDefaultTarget(Boolean isClassicStyle)
getDefaultTarget in interface Deploymentpublic String getDefaultTarget(String appName, OpsParams.Origin origin, Boolean isClassicStyle)
getDefaultTarget in interface Deploymentpublic Deployment.DeploymentContextBuilder getBuilder(Logger logger, OpsParams params, ActionReport report)
getBuilder in interface Deploymentpublic ParameterMap prepareInstanceDeployParamMap(DeploymentContext dc) throws Exception
prepareInstanceDeployParamMap in interface DeploymentExceptionpublic void validateDeploymentTarget(String target, String name, boolean isRedeploy)
validateDeploymentTarget in interface Deploymentpublic void validateUndeploymentTarget(String target, String name)
validateUndeploymentTarget in interface Deploymentpublic void validateSpecifiedTarget(String target)
validateSpecifiedTarget in interface Deploymentpublic boolean isAppEnabled(Application app)
isAppEnabled in interface Deploymentpublic ExtendedDeploymentContext disable(UndeployCommandParameters commandParams, Application app, ApplicationInfo appInfo, ActionReport report, Logger logger) throws Exception
disable in interface DeploymentExceptionpublic ExtendedDeploymentContext enable(String target, Application app, ApplicationRef appRef, ActionReport report, Logger logger) throws Exception
enable in interface DeploymentExceptionpublic List<Sniffer> getSniffersFromApp(Application app)
getSniffersFromApp in interface DeploymentCopyright © 2017. All rights reserved.