Class ComponentDescription

    • Constructor Detail

      • ComponentDescription

        public ComponentDescription​(String componentName,
                                    String componentClassName,
                                    EEModuleDescription moduleDescription,
                                    org.jboss.msc.service.ServiceName deploymentUnitServiceName)
        Construct a new instance.
        Parameters:
        componentName - the component name
        componentClassName - the component instance class name
        moduleDescription - the EE module description
        deploymentUnitServiceName - the service name of the DU containing this component
    • Method Detail

      • createConfiguration

        public ComponentConfiguration createConfiguration​(org.jboss.as.server.deployment.reflect.ClassReflectionIndex classIndex,
                                                          ClassLoader moduleClassLoader,
                                                          org.jboss.modules.ModuleLoader moduleLoader)
      • getComponentName

        public String getComponentName()
        Get the component name.
        Returns:
        the component name
      • setContextServiceName

        public void setContextServiceName​(org.jboss.msc.service.ServiceName contextServiceName)
        Set context service name.
        Parameters:
        contextServiceName -
      • getContextServiceName

        public org.jboss.msc.service.ServiceName getContextServiceName()
        Get the context service name.
        Returns:
        the context service name
      • getServiceName

        public org.jboss.msc.service.ServiceName getServiceName()
        Get the base service name for this component.
        Returns:
        the base service name
      • getStartServiceName

        public org.jboss.msc.service.ServiceName getStartServiceName()
        Get the service name of this components start service
        Returns:
        The start service name
      • getCreateServiceName

        public org.jboss.msc.service.ServiceName getCreateServiceName()
        Get the service name of this components create service
        Returns:
        The create service name
      • getComponentClassName

        public String getComponentClassName()
        Get the component instance class name.
        Returns:
        the component class name
      • getModuleName

        public String getModuleName()
        Get the component's module name.
        Returns:
        the module name
      • getApplicationName

        public String getApplicationName()
        Get the component's module's application name.
        Returns:
        the application name
      • getClassInterceptors

        public List<InterceptorDescription> getClassInterceptors()
        Get the list of interceptor classes applied directly to class. These interceptors will have lifecycle methods invoked
        Returns:
        the interceptor classes
      • setClassInterceptors

        public void setClassInterceptors​(List<InterceptorDescription> classInterceptors)
        Override the class interceptors with a new set of interceptors
        Parameters:
        classInterceptors -
      • getDefaultInterceptors

        public List<InterceptorDescription> getDefaultInterceptors()
        Returns:
        the components default interceptors
      • getAllInterceptors

        public Set<InterceptorDescription> getAllInterceptors()
        Returns a combined map of class and method level interceptors
        Returns:
        all interceptors on the class
      • isExcludeDefaultInterceptors

        public boolean isExcludeDefaultInterceptors()
        Returns:
        true if the ExcludeDefaultInterceptors annotation was applied to the class
      • setExcludeDefaultInterceptors

        public void setExcludeDefaultInterceptors​(boolean excludeDefaultInterceptors)
      • isIgnoreLifecycleInterceptors

        public boolean isIgnoreLifecycleInterceptors()
      • setIgnoreLifecycleInterceptors

        public void setIgnoreLifecycleInterceptors​(boolean ignoreLifecycleInterceptors)
        If this component should ignore lifecycle interceptors. This should generally only be set when they are going to be handled by an external framework such as Weld.
      • excludeDefaultInterceptors

        public void excludeDefaultInterceptors​(org.jboss.invocation.proxy.MethodIdentifier method)
        Parameters:
        method - The method that has been annotated @ExcludeDefaultInterceptors
      • isExcludeDefaultInterceptors

        public boolean isExcludeDefaultInterceptors​(org.jboss.invocation.proxy.MethodIdentifier method)
      • excludeClassInterceptors

        public void excludeClassInterceptors​(org.jboss.invocation.proxy.MethodIdentifier method)
        Parameters:
        method - The method that has been annotated @ExcludeClassInterceptors
      • isExcludeClassInterceptors

        public boolean isExcludeClassInterceptors​(org.jboss.invocation.proxy.MethodIdentifier method)
      • addClassInterceptor

        public void addClassInterceptor​(InterceptorDescription description)
        Add a class level interceptor.
        Parameters:
        description - the interceptor class description
      • getClassInterceptor

        public InterceptorDescription getClassInterceptor​(String interceptorClassName)
        Returns the InterceptorDescription for the passed interceptorClassName, if such a class interceptor exists for this component description. Else returns null.
        Parameters:
        interceptorClassName - The fully qualified interceptor class name
        Returns:
      • getMethodInterceptors

        public Map<org.jboss.invocation.proxy.MethodIdentifier,​List<InterceptorDescription>> getMethodInterceptors()
        Get the method interceptor configurations. The key is the method identifier, the value is the set of class names of interceptors to configure on that method.
        Returns:
        the method interceptor configurations
      • addMethodInterceptor

        public void addMethodInterceptor​(org.jboss.invocation.proxy.MethodIdentifier method,
                                         InterceptorDescription description)
        Add a method interceptor class name.
        Parameters:
        method - the method
        description - the interceptor descriptor
      • setMethodInterceptors

        public 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.

        This is used to set the final interceptor order after it has been modifier by the deployment descriptor

        Parameters:
        identifier - the method identifier
        interceptorDescriptions - The interceptors
      • addInterceptorMethodOverride

        public void addInterceptorMethodOverride​(String className,
                                                 InterceptorClassDescription override)
        Adds an interceptor class method override, merging it with existing overrides (if any)
        Parameters:
        className - The class name
        override - The method override
      • getNamingMode

        public ComponentNamingMode getNamingMode()
        Get the naming mode of this component.
        Returns:
        the naming mode
      • setNamingMode

        public void setNamingMode​(ComponentNamingMode namingMode)
        Set the naming mode of this component. May not be null.
        Parameters:
        namingMode - the naming mode
      • getModuleDescription

        public EEModuleDescription getModuleDescription()
        Returns:
        The module description for the component
      • addDependency

        public void addDependency​(org.jboss.msc.service.ServiceName serviceName)
        Add a dependency to this component. If the same dependency is added multiple times, only the first will take effect.
        Parameters:
        serviceName - the service name of the dependency
      • getDependencies

        public Set<org.jboss.msc.service.ServiceName> getDependencies()
        Get the dependency set.
        Returns:
        the dependency set
      • getBindingConfigurations

        public List<BindingConfiguration> getBindingConfigurations()
        Get the binding configurations for this component. This list contains bindings which are specific to the component.
        Returns:
        the binding configurations
      • getViews

        public Set<ViewDescription> getViews()
        Get the list of views which apply to this component.
        Returns:
        the list of views
      • isTimerServiceApplicable

        public boolean isTimerServiceApplicable()
        Returns:
        true If this component type is eligible for a timer service
      • isTimerServiceRequired

        public boolean isTimerServiceRequired()
        Returns:
        true if this component has timeout methods and is eligible for a 'real' timer service
      • getTimerMethods

        public Set<org.jboss.invocation.proxy.MethodIdentifier> getTimerMethods()
        Returns:
        The set of all method identifiers for the timeout methods
      • isPassivationApplicable

        public boolean isPassivationApplicable()
      • getConfigurators

        public Deque<ComponentConfigurator> getConfigurators()
        Get the configurators for this component.
        Returns:
        the configurators
      • isIntercepted

        public boolean isIntercepted()
      • isOptional

        public boolean isOptional()
        Returns:
        true if errors should be ignored when installing this component
      • getBeanDeploymentArchiveId

        public String getBeanDeploymentArchiveId()
      • setBeanDeploymentArchiveId

        public void setBeanDeploymentArchiveId​(String beanDeploymentArchiveId)
      • isCDIInterceptorEnabled

        public boolean isCDIInterceptorEnabled()
        If this method returns true then Weld will directly create the component instance, which will apply interceptors and decorators via sub classing. For most components this is not necessary. Also not that even though Jakarta Enterprise Beans's are intercepted, their interceptor is done through a different method that integrates with the existing Jakarta Enterprise Beans interceptor chain