Package org.jboss.as.ee.component
Class ComponentConfiguration
java.lang.Object
org.jboss.as.ee.component.ComponentConfiguration
The construction parameter set passed in to an abstract component.
Interceptors
NOTE: References in this file to Interceptors refer to the Jakarta Interceptors unless otherwise noted. The interceptor factories provided herein are assembled from the component's EE module class as well as the EE module classes of the declared interceptor classes for this component by way of a configurator.- Author:
- David M. Lloyd
-
Constructor Summary
ConstructorsConstructorDescriptionComponentConfiguration(ComponentDescription componentDescription, org.jboss.as.server.deployment.reflect.ClassReflectionIndex classIndex, ClassLoader moduleClassLoader, org.jboss.modules.ModuleLoader moduleLoader) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAroundConstructInterceptor(org.jboss.invocation.InterceptorFactory interceptorFactory, int priority) Adds an around-construct interceptorvoidaddAroundConstructInterceptors(List<org.jboss.invocation.InterceptorFactory> factories, int priority) Adds an around-construct interceptorvoidaddComponentInterceptor(Method method, org.jboss.invocation.InterceptorFactory factory, int priority) Adds an interceptor factory to a given method.voidaddComponentInterceptor(org.jboss.invocation.InterceptorFactory factory, int priority, boolean publicOnly) Adds an interceptor factory to every method on the component.voidaddComponentInterceptors(Method method, List<org.jboss.invocation.InterceptorFactory> factory, int priority) Adds an interceptor factory to a given method.voidaddComponentInterceptors(List<org.jboss.invocation.InterceptorFactory> factory, int priority, boolean publicOnly) Adds an interceptor factory to every method on the component.voidaddLifecycleMethod(Method method) Adds a lifecycle method to the lifecycle methods setvoidaddPostActivateInterceptor(org.jboss.invocation.InterceptorFactory interceptorFactory, int priority) Adds a post activate interceptorvoidaddPostActivateInterceptors(List<org.jboss.invocation.InterceptorFactory> interceptorFactory, int priority) Adds a post activate interceptorvoidaddPostConstructInterceptor(org.jboss.invocation.InterceptorFactory interceptorFactory, int priority) Adds a post construct interceptorvoidaddPostConstructInterceptors(List<org.jboss.invocation.InterceptorFactory> interceptorFactory, int priority) Adds a post construct interceptorvoidaddPreDestroyInterceptor(org.jboss.invocation.InterceptorFactory interceptorFactory, int priority) Adds a pre destroy interceptorvoidaddPreDestroyInterceptors(List<org.jboss.invocation.InterceptorFactory> factories, int priority) Adds a pre destroy interceptorvoidaddPrePassivateInterceptor(org.jboss.invocation.InterceptorFactory interceptorFactory, int priority) Adds a pre passivate interceptorvoidaddPrePassivateInterceptors(List<org.jboss.invocation.InterceptorFactory> factories, int priority) Adds a pre passivate interceptorvoidaddTimeoutViewInterceptor(Method method, org.jboss.invocation.InterceptorFactory factory, int priority) Adds a timeout interceptor factory to every method on the component.voidaddTimeoutViewInterceptor(org.jboss.invocation.InterceptorFactory factory, int priority) Adds a timeout interceptor factory to every method on the component.Get the application name.List<org.jboss.invocation.InterceptorFactory>Get the around-construct interceptors.List<org.jboss.invocation.InterceptorFactory>getAroundTimeoutInterceptors(Method method) Gets the around timeout interceptor list for a given method.org.jboss.as.server.deployment.reflect.ClassReflectionIndexClass<?>Get the component class.Get the component create service factory for this component.Get the component description.List<org.jboss.invocation.InterceptorFactory>getComponentInterceptors(Method method) Gets the interceptor list for a given method.Get the component name.List<DependencyConfigurator<? extends org.jboss.msc.service.Service<Component>>>Get the create dependencies list.Get the set of currently known component methods.Get the instance factory for this component.Returns a set of all lifecycle methods defined on the beanorg.jboss.modules.ModuleLoaderGet the module name.org.jboss.invocation.InterceptorFactoryList<org.jboss.invocation.InterceptorFactory>Get the post-activate interceptors.List<org.jboss.invocation.InterceptorFactory>Get the post-construct interceptors.List<org.jboss.invocation.InterceptorFactory>Get the pre-destroy interceptors.List<org.jboss.invocation.InterceptorFactory>Get the pre-passivate interceptors.Get the start dependencies list.getViews()Get the list of views for this component.voidsetComponentCreateServiceFactory(ComponentCreateServiceFactory componentCreateServiceFactory) Set the component create service factory for this component.voidsetInstanceFactory(ComponentFactory instanceFactory) Set the instance factory for this component.voidsetNamespaceContextInterceptorFactory(org.jboss.invocation.InterceptorFactory interceptorFactory) voidsetNamespaceContextSelector(NamespaceContextSelector namespaceContextSelector) toString()
-
Constructor Details
-
ComponentConfiguration
public ComponentConfiguration(ComponentDescription componentDescription, org.jboss.as.server.deployment.reflect.ClassReflectionIndex classIndex, ClassLoader moduleClassLoader, org.jboss.modules.ModuleLoader moduleLoader)
-
-
Method Details
-
getComponentDescription
Get the component description.- Returns:
- the component description
-
getComponentClass
Get the component class.- Returns:
- the component class
-
getComponentName
Get the component name.- Returns:
- the component name
-
getDefinedComponentMethods
Get the set of currently known component methods. This is an identity set.- Returns:
- the set of methods
-
getComponentInterceptors
Gets the interceptor list for a given method. This should not be called until all interceptors have been added.- Parameters:
method- the component method- Returns:
- the deque
-
getAroundTimeoutInterceptors
Gets the around timeout interceptor list for a given method. This should not be called until all interceptors have been added.- Parameters:
method- the component method- Returns:
- the deque
-
addComponentInterceptor
public void addComponentInterceptor(org.jboss.invocation.InterceptorFactory factory, int priority, boolean publicOnly) Adds an interceptor factory to every method on the component.- Parameters:
factory- The interceptor factory to addpriority- The interceptors relative orderpublicOnly- If true then then interceptor is only added to public methods
-
addComponentInterceptors
public void addComponentInterceptors(List<org.jboss.invocation.InterceptorFactory> factory, int priority, boolean publicOnly) Adds an interceptor factory to every method on the component.- Parameters:
factory- The interceptor factory to addpriority- The interceptors relative orderpublicOnly- If true then then interceptor is only added to public methods
-
addComponentInterceptor
public void addComponentInterceptor(Method method, org.jboss.invocation.InterceptorFactory factory, int priority) Adds an interceptor factory to a given method. The method parameter *must* be retrived from either theDeploymentReflectionIndexor fromgetDefinedComponentMethods(), as the methods are stored in an identity hash map- Parameters:
method- The method to add the interceptor tofactory- The interceptor factory to addpriority- The interceptors relative order
-
addComponentInterceptors
public void addComponentInterceptors(Method method, List<org.jboss.invocation.InterceptorFactory> factory, int priority) Adds an interceptor factory to a given method. The method parameter *must* be retrived from either theDeploymentReflectionIndexor fromgetDefinedComponentMethods(), as the methods are stored in an identity hash map- Parameters:
method- The method to add the interceptor tofactory- The interceptor factory to addpriority- The interceptors relative order
-
addTimeoutViewInterceptor
public void addTimeoutViewInterceptor(org.jboss.invocation.InterceptorFactory factory, int priority) Adds a timeout interceptor factory to every method on the component.- Parameters:
factory- The interceptor factory to addpriority- The interceptors relative order
-
addTimeoutViewInterceptor
public void addTimeoutViewInterceptor(Method method, org.jboss.invocation.InterceptorFactory factory, int priority) Adds a timeout interceptor factory to every method on the component.- Parameters:
method- The method to add it tofactory- The interceptor factory to addpriority- The interceptors relative order
-
getCreateDependencies
public List<DependencyConfigurator<? extends org.jboss.msc.service.Service<Component>>> getCreateDependencies()Get the create dependencies list.- Returns:
- the create dependencies list
-
getStartDependencies
Get the start dependencies list.- Returns:
- the start dependencies list
-
getViews
Get the list of views for this component.- Returns:
- the list of views
-
getAroundConstructInterceptors
Get the around-construct interceptors. This method should only be called after all interceptors have been added- Returns:
- the sorted interceptors
-
addAroundConstructInterceptors
public void addAroundConstructInterceptors(List<org.jboss.invocation.InterceptorFactory> factories, int priority) Adds an around-construct interceptor- Parameters:
factories- The interceptors to addpriority- The priority
-
addAroundConstructInterceptor
public void addAroundConstructInterceptor(org.jboss.invocation.InterceptorFactory interceptorFactory, int priority) Adds an around-construct interceptor- Parameters:
interceptorFactory- The interceptor to addpriority- The priority
-
getPostConstructInterceptors
Get the post-construct interceptors. This method should only be called after all interceptors have been added- Returns:
- the sorted interceptors
-
addPostConstructInterceptors
public void addPostConstructInterceptors(List<org.jboss.invocation.InterceptorFactory> interceptorFactory, int priority) Adds a post construct interceptor- Parameters:
interceptorFactory- The interceptor to addpriority- The priority
-
addPostConstructInterceptor
public void addPostConstructInterceptor(org.jboss.invocation.InterceptorFactory interceptorFactory, int priority) Adds a post construct interceptor- Parameters:
interceptorFactory- The interceptor to addpriority- The priority
-
getPreDestroyInterceptors
Get the pre-destroy interceptors. This method should only be called after all interceptors have been added- Returns:
- the sorted interceptor
-
addPreDestroyInterceptors
public void addPreDestroyInterceptors(List<org.jboss.invocation.InterceptorFactory> factories, int priority) Adds a pre destroy interceptor- Parameters:
factories- The interceptor factory to addpriority- The factories priority
-
addPreDestroyInterceptor
public void addPreDestroyInterceptor(org.jboss.invocation.InterceptorFactory interceptorFactory, int priority) Adds a pre destroy interceptor- Parameters:
interceptorFactory- The interceptor factory to addpriority- The factories priority
-
getPrePassivateInterceptors
Get the pre-passivate interceptors. This method should only be called after all interceptors have been added- Returns:
- the sorted interceptors
-
addPrePassivateInterceptors
public void addPrePassivateInterceptors(List<org.jboss.invocation.InterceptorFactory> factories, int priority) Adds a pre passivate interceptor- Parameters:
factories- The interceptor to addpriority- The priority
-
addPrePassivateInterceptor
public void addPrePassivateInterceptor(org.jboss.invocation.InterceptorFactory interceptorFactory, int priority) Adds a pre passivate interceptor- Parameters:
interceptorFactory- The interceptor to addpriority- The priority
-
getPostActivateInterceptors
Get the post-activate interceptors. This method should only be called after all interceptors have been added- Returns:
- the sorted interceptors
-
addPostActivateInterceptors
public void addPostActivateInterceptors(List<org.jboss.invocation.InterceptorFactory> interceptorFactory, int priority) Adds a post activate interceptor- Parameters:
interceptorFactory- The interceptor to addpriority- The priority
-
addPostActivateInterceptor
public void addPostActivateInterceptor(org.jboss.invocation.InterceptorFactory interceptorFactory, int priority) Adds a post activate interceptor- Parameters:
interceptorFactory- The interceptor to addpriority- The priority
-
getApplicationName
Get the application name.- Returns:
- the application name
-
getModuleName
Get the module name.- Returns:
- the module name
-
getInstanceFactory
Get the instance factory for this component.- Returns:
- the instance factory
-
setInstanceFactory
Set the instance factory for this component.- Parameters:
instanceFactory- the instance factory
-
getClassIndex
public org.jboss.as.server.deployment.reflect.ClassReflectionIndex getClassIndex() -
getComponentCreateServiceFactory
Get the component create service factory for this component.- Returns:
- the component create service factory
-
setComponentCreateServiceFactory
public void setComponentCreateServiceFactory(ComponentCreateServiceFactory componentCreateServiceFactory) Set the component create service factory for this component.- Parameters:
componentCreateServiceFactory- the component create service factory
-
toString
-
getNamespaceContextInterceptorFactory
public org.jboss.invocation.InterceptorFactory getNamespaceContextInterceptorFactory() -
setNamespaceContextInterceptorFactory
public void setNamespaceContextInterceptorFactory(org.jboss.invocation.InterceptorFactory interceptorFactory) -
getModuleClassLoader
-
getModuleLoader
public org.jboss.modules.ModuleLoader getModuleLoader() -
getNamespaceContextSelector
- Returns:
- The components namespace context selector, if any
-
setNamespaceContextSelector
-
getInterceptorContextKeys
-
addLifecycleMethod
Adds a lifecycle method to the lifecycle methods set- Parameters:
method- The lifecycle method
-
getLifecycleMethods
Returns a set of all lifecycle methods defined on the bean- Returns:
- All lifecycle methods defined on the component class and its superclasses
-