Package org.glassfish.weld
Class WeldDeployer
- java.lang.Object
-
- org.glassfish.deployment.common.SimpleDeployer<WeldContainer,WeldApplicationContainer>
-
- org.glassfish.weld.WeldDeployer
-
- All Implemented Interfaces:
Deployer<WeldContainer,WeldApplicationContainer>,EventListener,org.glassfish.hk2.api.PostConstruct
@Service public class WeldDeployer extends SimpleDeployer<WeldContainer,WeldApplicationContainer> implements org.glassfish.hk2.api.PostConstruct, EventListener
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.glassfish.api.event.EventListener
EventListener.Event<T>
-
-
Field Summary
Fields Modifier and Type Field Description static StringDEV_MODE_PROPERTYstatic StringSNIFFER_EXTENSIONSstatic StringWELD_DEPLOYMENTstatic StringWELD_EXTENSION
-
Constructor Summary
Constructors Constructor Description WeldDeployer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcleanArtifacts(DeploymentContext dc)voidevent(EventListener.Event<?> event)Specific stages of the Weld bootstrapping process will execute across different stages of the deployment process.protected voidgenerateArtifacts(DeploymentContext dc)org.jboss.weld.bootstrap.spi.BeanDeploymentArchivegetBeanDeploymentArchiveForBundle(BundleDescriptor bundle)org.jboss.weld.bootstrap.WeldBootstrapgetBootstrapForApp(Application app)MetaDatagetMetaData()Returns the meta data assocated with this Deployerbooleanis299Enabled(BundleDescriptor bundle)booleanisCdiEnabled(BundleDescriptor bundle)WeldApplicationContainerload(WeldContainer container, DeploymentContext context)Processing in this method is performed for each module that is in the process of being loaded by the container.<V> VloadMetaData(Class<V> type, DeploymentContext context)Loads the meta date associated with the application.voidpostConstruct()booleanprepare(DeploymentContext context)Prepares the application bits for running in the application server.-
Methods inherited from class org.glassfish.deployment.common.SimpleDeployer
clean, unload
-
-
-
-
Field Detail
-
WELD_EXTENSION
public static final String WELD_EXTENSION
- See Also:
- Constant Field Values
-
WELD_DEPLOYMENT
public static final String WELD_DEPLOYMENT
- See Also:
- Constant Field Values
-
SNIFFER_EXTENSIONS
public static final String SNIFFER_EXTENSIONS
- See Also:
- Constant Field Values
-
DEV_MODE_PROPERTY
public static final String DEV_MODE_PROPERTY
- See Also:
- Constant Field Values
-
-
Method Detail
-
getMetaData
public MetaData getMetaData()
Description copied from class:SimpleDeployerReturns the meta data assocated with this Deployer- Specified by:
getMetaDatain interfaceDeployer<WeldContainer,WeldApplicationContainer>- Overrides:
getMetaDatain classSimpleDeployer<WeldContainer,WeldApplicationContainer>- Returns:
- the meta data for this Deployer
-
postConstruct
public void postConstruct()
- Specified by:
postConstructin interfaceorg.glassfish.hk2.api.PostConstruct
-
prepare
public boolean prepare(DeploymentContext context)
Description copied from class:SimpleDeployerPrepares the application bits for running in the application server. For certain cases, this is generating non portable artifacts and other application specific tasks. Failure to prepare should throw an exception which will cause the overall deployment to fail.- Specified by:
preparein interfaceDeployer<WeldContainer,WeldApplicationContainer>- Overrides:
preparein classSimpleDeployer<WeldContainer,WeldApplicationContainer>- Parameters:
context- deployment context- Returns:
- true if the prepare phase was successful
-
load
public WeldApplicationContainer load(WeldContainer container, DeploymentContext context)
Processing in this method is performed for each module that is in the process of being loaded by the container.This method will collect information from each archive (module) and produce
BeanDeploymentArchiveinformation for each module.The
BeanDeploymentArchives are stored in theDeployment(that will eventually be handed off toWeld. Once this method is called for all modules (andBeanDeploymentArchiveinformation has been collected for allWeldmodules), a relationship structure is produced defining the accessiblity rules for theBeanDeploymentArchives.- Specified by:
loadin interfaceDeployer<WeldContainer,WeldApplicationContainer>- Overrides:
loadin classSimpleDeployer<WeldContainer,WeldApplicationContainer>- Parameters:
container-context-- Returns:
-
event
public void event(EventListener.Event<?> event)
Specific stages of the Weld bootstrapping process will execute across different stages of the deployment process. Weld deployment will happen when the load phase of the deployment process is complete. When all modules have been loaded, a deployment graph is produced defining the accessibility relationships betweenBeanDeploymentArchives.- Specified by:
eventin interfaceEventListener- Parameters:
event-
-
generateArtifacts
protected void generateArtifacts(DeploymentContext dc) throws DeploymentException
- Specified by:
generateArtifactsin classSimpleDeployer<WeldContainer,WeldApplicationContainer>- Throws:
DeploymentException
-
cleanArtifacts
protected void cleanArtifacts(DeploymentContext dc) throws DeploymentException
- Specified by:
cleanArtifactsin classSimpleDeployer<WeldContainer,WeldApplicationContainer>- Throws:
DeploymentException
-
loadMetaData
public <V> V loadMetaData(Class<V> type, DeploymentContext context)
Description copied from class:SimpleDeployerLoads the meta date associated with the application.- Specified by:
loadMetaDatain interfaceDeployer<WeldContainer,WeldApplicationContainer>- Overrides:
loadMetaDatain classSimpleDeployer<WeldContainer,WeldApplicationContainer>- Parameters:
type- type of meta-data that this deployer has declared providing.- Returns:
- the meta-data of type V
-
getBeanDeploymentArchiveForBundle
public org.jboss.weld.bootstrap.spi.BeanDeploymentArchive getBeanDeploymentArchiveForBundle(BundleDescriptor bundle)
-
isCdiEnabled
public boolean isCdiEnabled(BundleDescriptor bundle)
-
is299Enabled
public boolean is299Enabled(BundleDescriptor bundle)
-
getBootstrapForApp
public org.jboss.weld.bootstrap.WeldBootstrap getBootstrapForApp(Application app)
-
-