Package org.jboss.as.ee.component
Class ComponentConfiguration
- java.lang.Object
-
- org.jboss.as.ee.component.ComponentConfiguration
-
public class ComponentConfiguration extends Object
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
Constructors Constructor Description ComponentConfiguration(ComponentDescription componentDescription, org.jboss.as.server.deployment.reflect.ClassReflectionIndex classIndex, ClassLoader moduleClassLoader, org.jboss.modules.ModuleLoader moduleLoader)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAroundConstructInterceptor(org.jboss.invocation.InterceptorFactory interceptorFactory, int priority)
Adds an around-construct interceptorvoid
addAroundConstructInterceptors(List<org.jboss.invocation.InterceptorFactory> factories, int priority)
Adds an around-construct interceptorvoid
addComponentInterceptor(Method method, org.jboss.invocation.InterceptorFactory factory, int priority)
Adds an interceptor factory to a given method.void
addComponentInterceptor(org.jboss.invocation.InterceptorFactory factory, int priority, boolean publicOnly)
Adds an interceptor factory to every method on the component.void
addComponentInterceptors(Method method, List<org.jboss.invocation.InterceptorFactory> factory, int priority)
Adds an interceptor factory to a given method.void
addComponentInterceptors(List<org.jboss.invocation.InterceptorFactory> factory, int priority, boolean publicOnly)
Adds an interceptor factory to every method on the component.void
addLifecycleMethod(Method method)
Adds a lifecycle method to the lifecycle methods setvoid
addPostActivateInterceptor(org.jboss.invocation.InterceptorFactory interceptorFactory, int priority)
Adds a post activate interceptorvoid
addPostActivateInterceptors(List<org.jboss.invocation.InterceptorFactory> interceptorFactory, int priority)
Adds a post activate interceptorvoid
addPostConstructInterceptor(org.jboss.invocation.InterceptorFactory interceptorFactory, int priority)
Adds a post construct interceptorvoid
addPostConstructInterceptors(List<org.jboss.invocation.InterceptorFactory> interceptorFactory, int priority)
Adds a post construct interceptorvoid
addPreDestroyInterceptor(org.jboss.invocation.InterceptorFactory interceptorFactory, int priority)
Adds a pre destroy interceptorvoid
addPreDestroyInterceptors(List<org.jboss.invocation.InterceptorFactory> factories, int priority)
Adds a pre destroy interceptorvoid
addPrePassivateInterceptor(org.jboss.invocation.InterceptorFactory interceptorFactory, int priority)
Adds a pre passivate interceptorvoid
addPrePassivateInterceptors(List<org.jboss.invocation.InterceptorFactory> factories, int priority)
Adds a pre passivate interceptorvoid
addTimeoutViewInterceptor(Method method, org.jboss.invocation.InterceptorFactory factory, int priority)
Adds a timeout interceptor factory to every method on the component.void
addTimeoutViewInterceptor(org.jboss.invocation.InterceptorFactory factory, int priority)
Adds a timeout interceptor factory to every method on the component.String
getApplicationName()
Get the application name.List<org.jboss.invocation.InterceptorFactory>
getAroundConstructInterceptors()
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.ClassReflectionIndex
getClassIndex()
Class<?>
getComponentClass()
Get the component class.ComponentCreateServiceFactory
getComponentCreateServiceFactory()
Get the component create service factory for this component.ComponentDescription
getComponentDescription()
Get the component description.List<org.jboss.invocation.InterceptorFactory>
getComponentInterceptors(Method method)
Gets the interceptor list for a given method.String
getComponentName()
Get the component name.ConcurrentContext
getConcurrentContext()
List<DependencyConfigurator<? extends org.jboss.msc.service.Service<Component>>>
getCreateDependencies()
Get the create dependencies list.Set<Method>
getDefinedComponentMethods()
Get the set of currently known component methods.ComponentFactory
getInstanceFactory()
Get the instance factory for this component.Set<Object>
getInterceptorContextKeys()
Set<Method>
getLifecycleMethods()
Returns a set of all lifecycle methods defined on the beanClassLoader
getModuleClassLoader()
org.jboss.modules.ModuleLoader
getModuleLoader()
String
getModuleName()
Get the module name.org.jboss.invocation.InterceptorFactory
getNamespaceContextInterceptorFactory()
NamespaceContextSelector
getNamespaceContextSelector()
List<org.jboss.invocation.InterceptorFactory>
getPostActivateInterceptors()
Get the post-activate interceptors.List<org.jboss.invocation.InterceptorFactory>
getPostConstructInterceptors()
Get the post-construct interceptors.List<org.jboss.invocation.InterceptorFactory>
getPreDestroyInterceptors()
Get the pre-destroy interceptors.List<org.jboss.invocation.InterceptorFactory>
getPrePassivateInterceptors()
Get the pre-passivate interceptors.List<DependencyConfigurator<ComponentStartService>>
getStartDependencies()
Get the start dependencies list.List<ViewConfiguration>
getViews()
Get the list of views for this component.void
setComponentCreateServiceFactory(ComponentCreateServiceFactory componentCreateServiceFactory)
Set the component create service factory for this component.void
setInstanceFactory(ComponentFactory instanceFactory)
Set the instance factory for this component.void
setNamespaceContextInterceptorFactory(org.jboss.invocation.InterceptorFactory interceptorFactory)
void
setNamespaceContextSelector(NamespaceContextSelector namespaceContextSelector)
String
toString()
-
-
-
Constructor Detail
-
ComponentConfiguration
public ComponentConfiguration(ComponentDescription componentDescription, org.jboss.as.server.deployment.reflect.ClassReflectionIndex classIndex, ClassLoader moduleClassLoader, org.jboss.modules.ModuleLoader moduleLoader)
-
-
Method Detail
-
getComponentDescription
public ComponentDescription getComponentDescription()
Get the component description.- Returns:
- the component description
-
getComponentClass
public Class<?> getComponentClass()
Get the component class.- Returns:
- the component class
-
getComponentName
public String getComponentName()
Get the component name.- Returns:
- the component name
-
getDefinedComponentMethods
public Set<Method> getDefinedComponentMethods()
Get the set of currently known component methods. This is an identity set.- Returns:
- the set of methods
-
getComponentInterceptors
public List<org.jboss.invocation.InterceptorFactory> getComponentInterceptors(Method method)
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
public List<org.jboss.invocation.InterceptorFactory> getAroundTimeoutInterceptors(Method method)
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 theDeploymentReflectionIndex
or 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 theDeploymentReflectionIndex
or 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
public List<DependencyConfigurator<ComponentStartService>> getStartDependencies()
Get the start dependencies list.- Returns:
- the start dependencies list
-
getViews
public List<ViewConfiguration> getViews()
Get the list of views for this component.- Returns:
- the list of views
-
getAroundConstructInterceptors
public List<org.jboss.invocation.InterceptorFactory> 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
public List<org.jboss.invocation.InterceptorFactory> 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
public List<org.jboss.invocation.InterceptorFactory> 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
public List<org.jboss.invocation.InterceptorFactory> 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
public List<org.jboss.invocation.InterceptorFactory> 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
public String getApplicationName()
Get the application name.- Returns:
- the application name
-
getModuleName
public String getModuleName()
Get the module name.- Returns:
- the module name
-
getInstanceFactory
public ComponentFactory getInstanceFactory()
Get the instance factory for this component.- Returns:
- the instance factory
-
setInstanceFactory
public void setInstanceFactory(ComponentFactory instanceFactory)
Set the instance factory for this component.- Parameters:
instanceFactory
- the instance factory
-
getClassIndex
public org.jboss.as.server.deployment.reflect.ClassReflectionIndex getClassIndex()
-
getComponentCreateServiceFactory
public ComponentCreateServiceFactory 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
-
getNamespaceContextInterceptorFactory
public org.jboss.invocation.InterceptorFactory getNamespaceContextInterceptorFactory()
-
setNamespaceContextInterceptorFactory
public void setNamespaceContextInterceptorFactory(org.jboss.invocation.InterceptorFactory interceptorFactory)
-
getModuleClassLoader
public ClassLoader getModuleClassLoader()
-
getModuleLoader
public org.jboss.modules.ModuleLoader getModuleLoader()
-
getNamespaceContextSelector
public NamespaceContextSelector getNamespaceContextSelector()
- Returns:
- The components namespace context selector, if any
-
setNamespaceContextSelector
public void setNamespaceContextSelector(NamespaceContextSelector namespaceContextSelector)
-
getConcurrentContext
public ConcurrentContext getConcurrentContext()
-
addLifecycleMethod
public void addLifecycleMethod(Method method)
Adds a lifecycle method to the lifecycle methods set- Parameters:
method
- The lifecycle method
-
-