public interface WeldCapability
| Modifier and Type | Method and Description |
|---|---|
Supplier<javax.enterprise.inject.spi.BeanManager> |
addBeanManagerService(org.jboss.as.server.deployment.DeploymentUnit unit,
org.jboss.msc.service.ServiceBuilder<?> serviceBuilder)
Adds the Bean Manager service associated to the
DeploymentUnit to ServiceBuilder passed as argument. |
org.jboss.msc.service.ServiceBuilder<?> |
addBeanManagerService(org.jboss.as.server.deployment.DeploymentUnit unit,
org.jboss.msc.service.ServiceBuilder<?> serviceBuilder,
org.jboss.msc.inject.Injector<javax.enterprise.inject.spi.BeanManager> targetInjector)
Adds the Bean Manager service associated to the
DeploymentUnit to ServiceBuilder passed as argument. |
boolean |
isPartOfWeldDeployment(org.jboss.as.server.deployment.DeploymentUnit unit)
Returns true if the
DeploymentUnit is part of a weld deployment. |
boolean |
isWeldDeployment(org.jboss.as.server.deployment.DeploymentUnit unit)
Returns true if the
DeploymentUnit has a beans.xml in any of it's resource roots,
or is a top level deployment that contains sub-deployments that are weld deployments. |
void |
registerExtensionInstance(javax.enterprise.inject.spi.Extension extension,
org.jboss.as.server.deployment.DeploymentUnit unit)
Registers a CDI Portable Extension for the
DeploymentUnit passed as argument to
this method. |
void registerExtensionInstance(javax.enterprise.inject.spi.Extension extension,
org.jboss.as.server.deployment.DeploymentUnit unit)
DeploymentUnit passed as argument to
this method.
The extension is registered if only if the DeploymentUnit is part of a Weld Deployment. Specifically,
if a call to isPartOfWeldDeployment(DeploymentUnit) using the DeploymentUnit argument
returns true. Otherwise this method will return immediately.
extension - An instance of the CDI portable extension to add.unit - The deployment unit where the extension will be registered.Supplier<javax.enterprise.inject.spi.BeanManager> addBeanManagerService(org.jboss.as.server.deployment.DeploymentUnit unit, org.jboss.msc.service.ServiceBuilder<?> serviceBuilder)
DeploymentUnit to ServiceBuilder passed as argument.
The Bean Manager service is added if only if the DeploymentUnit is part of a Weld Deployment. Specifically,
if a call to isPartOfWeldDeployment(DeploymentUnit) using the DeploymentUnit argument
returns true. Otherwise this method will return null.
unit - DeploymentUnit used to get the Bean Manager service name. Cannot be null.serviceBuilder - The service builder used to add the dependency. Cannot be null.null.IllegalStateException - if this method
have been called after ServiceBuilder.setInstance(org.jboss.msc.Service) method.UnsupportedOperationException - if this service builder
wasn't created via ServiceTarget.addService(ServiceName) method.org.jboss.msc.service.ServiceBuilder<?> addBeanManagerService(org.jboss.as.server.deployment.DeploymentUnit unit,
org.jboss.msc.service.ServiceBuilder<?> serviceBuilder,
org.jboss.msc.inject.Injector<javax.enterprise.inject.spi.BeanManager> targetInjector)
DeploymentUnit to ServiceBuilder passed as argument.
Use this method to add the service dependency for legacy msc services.
The Bean Manager service is added if only if the DeploymentUnit is part of a Weld Deployment. Specifically,
if a call to isPartOfWeldDeployment(DeploymentUnit) using the DeploymentUnit argument
returns true. Otherwise this method will return immediately without applying any modification to the serviceBuilder.
unit - DeploymentUnit used to get the Bean Manager service name. Cannot be null.serviceBuilder - The service builder used to add the dependency. Cannot be null.targetInjector - the injector into which the dependency should be stored. Cannot be null.UnsupportedOperationException - if the service builder was created via
ServiceTarget.addService(ServiceName) method.boolean isPartOfWeldDeployment(org.jboss.as.server.deployment.DeploymentUnit unit)
DeploymentUnit is part of a weld deployment.unit - DeploymentUnit to check.DeploymentUnit is part of a weld deployment.boolean isWeldDeployment(org.jboss.as.server.deployment.DeploymentUnit unit)
DeploymentUnit has a beans.xml in any of it's resource roots,
or is a top level deployment that contains sub-deployments that are weld deployments.unit - DeploymentUnit to check.DeploymentUnit has a beans.xml in any of it's resource roots,
or is a top level deployment that contains sub-deployments that are weld deployments.Copyright © 2021 JBoss by Red Hat. All rights reserved.