public class ComponentDescription extends Object implements ResourceInjectionTarget
Constructor and Description |
---|
ComponentDescription(String componentName,
String componentClassName,
EEModuleDescription moduleDescription,
org.jboss.msc.service.ServiceName deploymentUnitServiceName)
Construct a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
addClassInterceptor(InterceptorDescription description)
Add a class level interceptor.
|
void |
addDependency(org.jboss.msc.service.ServiceName serviceName,
org.jboss.msc.service.ServiceBuilder.DependencyType type)
Add a dependency to this component.
|
void |
addInterceptorMethodOverride(String className,
InterceptorClassDescription override)
Adds an interceptor class method override, merging it with existing overrides (if any)
|
void |
addMethodInterceptor(org.jboss.invocation.proxy.MethodIdentifier method,
InterceptorDescription description)
Add a method interceptor class name.
|
void |
addResourceInjection(ResourceInjectionConfiguration injection) |
ComponentConfiguration |
createConfiguration(ClassIndex classIndex,
ClassLoader moduleClassLoader,
org.jboss.modules.ModuleLoader moduleLoader) |
void |
excludeClassInterceptors(org.jboss.invocation.proxy.MethodIdentifier method) |
void |
excludeDefaultInterceptors(org.jboss.invocation.proxy.MethodIdentifier method) |
Set<InterceptorDescription> |
getAllInterceptors()
Returns a combined map of class and method level interceptors
|
String |
getApplicationName()
Get the component's module's application name.
|
String |
getBeanDeploymentArchiveId() |
List<BindingConfiguration> |
getBindingConfigurations()
Get the binding configurations for this component.
|
InterceptorDescription |
getClassInterceptor(String interceptorClassName)
Returns the
InterceptorDescription for the passed interceptorClassName , if such a class
interceptor exists for this component description. |
List<InterceptorDescription> |
getClassInterceptors()
Get the list of interceptor classes applied directly to class.
|
String |
getComponentClassName()
Get the component instance class name.
|
String |
getComponentName()
Get the component name.
|
Deque<ComponentConfigurator> |
getConfigurators()
Get the configurators for this component.
|
org.jboss.msc.service.ServiceName |
getContextServiceName()
Get the context service name.
|
org.jboss.msc.service.ServiceName |
getCreateServiceName()
Get the service name of this components create service
|
List<InterceptorDescription> |
getDefaultInterceptors() |
Map<org.jboss.msc.service.ServiceName,org.jboss.msc.service.ServiceBuilder.DependencyType> |
getDependencies()
Get the dependency map.
|
DeploymentDescriptorEnvironment |
getDeploymentDescriptorEnvironment() |
Map<org.jboss.invocation.proxy.MethodIdentifier,List<InterceptorDescription>> |
getMethodInterceptors()
Get the method interceptor configurations.
|
EEModuleDescription |
getModuleDescription() |
String |
getModuleName()
Get the component's module name.
|
ComponentNamingMode |
getNamingMode()
Get the naming mode of this component.
|
Map<InjectionTarget,ResourceInjectionConfiguration> |
getResourceInjections(String className) |
org.jboss.msc.service.ServiceName |
getServiceName()
Get the base service name for this component.
|
org.jboss.msc.service.ServiceName |
getStartServiceName()
Get the service name of this components start service
|
Set<org.jboss.invocation.proxy.MethodIdentifier> |
getTimerMethods() |
Set<ViewDescription> |
getViews()
Get the list of views which apply to this component.
|
boolean |
isCDIInterceptorEnabled()
If this method returns true then Weld will directly create the component instance,
which will apply interceptors and decorators via sub classing.
|
boolean |
isExcludeClassInterceptors(org.jboss.invocation.proxy.MethodIdentifier method) |
boolean |
isExcludeDefaultInterceptors() |
boolean |
isExcludeDefaultInterceptors(org.jboss.invocation.proxy.MethodIdentifier method) |
boolean |
isIgnoreLifecycleInterceptors() |
boolean |
isIntercepted() |
boolean |
isOptional() |
boolean |
isPassivationApplicable() |
boolean |
isTimerServiceApplicable() |
boolean |
isTimerServiceRequired() |
static InterceptorClassDescription |
mergeInterceptorConfig(Class<?> clazz,
EEModuleClassDescription classDescription,
ComponentDescription description,
boolean metadataComplete) |
void |
setBeanDeploymentArchiveId(String beanDeploymentArchiveId) |
void |
setClassInterceptors(List<InterceptorDescription> classInterceptors)
Override the class interceptors with a new set of interceptors
|
void |
setContextServiceName(org.jboss.msc.service.ServiceName contextServiceName)
Set context service name.
|
void |
setDefaultInterceptors(List<InterceptorDescription> defaultInterceptors) |
void |
setDeploymentDescriptorEnvironment(DeploymentDescriptorEnvironment deploymentDescriptorEnvironment) |
void |
setExcludeDefaultInterceptors(boolean excludeDefaultInterceptors) |
void |
setIgnoreLifecycleInterceptors(boolean ignoreLifecycleInterceptors)
If this component should ignore lifecycle interceptors.
|
void |
setMethodInterceptors(org.jboss.invocation.proxy.MethodIdentifier identifier,
List<InterceptorDescription> interceptorDescriptions)
Sets the method level interceptors for a method, and marks it as exclude class and default level interceptors.
|
void |
setNamingMode(ComponentNamingMode namingMode)
Set the naming mode of this component.
|
public ComponentDescription(String componentName, String componentClassName, EEModuleDescription moduleDescription, org.jboss.msc.service.ServiceName deploymentUnitServiceName)
componentName
- the component namecomponentClassName
- the component instance class namemoduleDescription
- the EE module descriptiondeploymentUnitServiceName
- the service name of the DU containing this componentpublic ComponentConfiguration createConfiguration(ClassIndex classIndex, ClassLoader moduleClassLoader, org.jboss.modules.ModuleLoader moduleLoader)
public String getComponentName()
public void setContextServiceName(org.jboss.msc.service.ServiceName contextServiceName)
contextServiceName
- public org.jboss.msc.service.ServiceName getContextServiceName()
public org.jboss.msc.service.ServiceName getServiceName()
public org.jboss.msc.service.ServiceName getStartServiceName()
public org.jboss.msc.service.ServiceName getCreateServiceName()
public String getComponentClassName()
public String getModuleName()
public String getApplicationName()
public List<InterceptorDescription> getClassInterceptors()
public void setClassInterceptors(List<InterceptorDescription> classInterceptors)
classInterceptors
- public List<InterceptorDescription> getDefaultInterceptors()
public void setDefaultInterceptors(List<InterceptorDescription> defaultInterceptors)
public Set<InterceptorDescription> getAllInterceptors()
public boolean isExcludeDefaultInterceptors()
true
if the ExcludeDefaultInterceptors
annotation was applied to the classpublic void setExcludeDefaultInterceptors(boolean excludeDefaultInterceptors)
public boolean isIgnoreLifecycleInterceptors()
public void setIgnoreLifecycleInterceptors(boolean ignoreLifecycleInterceptors)
public void excludeDefaultInterceptors(org.jboss.invocation.proxy.MethodIdentifier method)
method
- The method that has been annotated @ExcludeDefaultInterceptors
public boolean isExcludeDefaultInterceptors(org.jboss.invocation.proxy.MethodIdentifier method)
public void excludeClassInterceptors(org.jboss.invocation.proxy.MethodIdentifier method)
method
- The method that has been annotated @ExcludeClassInterceptors
public boolean isExcludeClassInterceptors(org.jboss.invocation.proxy.MethodIdentifier method)
public void addClassInterceptor(InterceptorDescription description)
description
- the interceptor class descriptionpublic InterceptorDescription getClassInterceptor(String interceptorClassName)
InterceptorDescription
for the passed interceptorClassName
, if such a class
interceptor exists for this component description. Else returns null.interceptorClassName
- The fully qualified interceptor class namepublic Map<org.jboss.invocation.proxy.MethodIdentifier,List<InterceptorDescription>> getMethodInterceptors()
public void addMethodInterceptor(org.jboss.invocation.proxy.MethodIdentifier method, InterceptorDescription description)
method
- the methoddescription
- the interceptor descriptorpublic void setMethodInterceptors(org.jboss.invocation.proxy.MethodIdentifier identifier, List<InterceptorDescription> interceptorDescriptions)
identifier
- the method identifierinterceptorDescriptions
- The interceptorspublic void addInterceptorMethodOverride(String className, InterceptorClassDescription override)
className
- The class nameoverride
- The method overridepublic ComponentNamingMode getNamingMode()
public void setNamingMode(ComponentNamingMode namingMode)
null
.namingMode
- the naming modepublic EEModuleDescription getModuleDescription()
public void addDependency(org.jboss.msc.service.ServiceName serviceName, org.jboss.msc.service.ServiceBuilder.DependencyType type)
serviceName
- the service name of the dependencytype
- the type of the dependency (required or optional)public Map<org.jboss.msc.service.ServiceName,org.jboss.msc.service.ServiceBuilder.DependencyType> getDependencies()
public DeploymentDescriptorEnvironment getDeploymentDescriptorEnvironment()
public void setDeploymentDescriptorEnvironment(DeploymentDescriptorEnvironment deploymentDescriptorEnvironment)
public List<BindingConfiguration> getBindingConfigurations()
public Set<ViewDescription> getViews()
public boolean isTimerServiceApplicable()
public boolean isTimerServiceRequired()
true
if this component has timeout methods and is eligible for a 'real' timer servicepublic Set<org.jboss.invocation.proxy.MethodIdentifier> getTimerMethods()
public boolean isPassivationApplicable()
public Deque<ComponentConfigurator> getConfigurators()
public boolean isIntercepted()
public boolean isOptional()
true
if errors should be ignored when installing this componentpublic String getBeanDeploymentArchiveId()
public void setBeanDeploymentArchiveId(String beanDeploymentArchiveId)
public void addResourceInjection(ResourceInjectionConfiguration injection)
addResourceInjection
in interface ResourceInjectionTarget
public Map<InjectionTarget,ResourceInjectionConfiguration> getResourceInjections(String className)
public boolean isCDIInterceptorEnabled()
public static InterceptorClassDescription mergeInterceptorConfig(Class<?> clazz, EEModuleClassDescription classDescription, ComponentDescription description, boolean metadataComplete)
Copyright © 2014 JBoss by Red Hat. All rights reserved.