Package org.jboss.weld.construction.api
Interface AroundConstructCallback<T>
-
- Type Parameters:
T
- type the component class
public interface AroundConstructCallback<T>
An implementation of this interface may be registered with aWeldCreationalContext
. Weld will then call thearoundConstruct(ConstructionHandle, AnnotatedConstructor, Object[], Map)
method of the implementation during component creation, allowing an integrator to perform additional steps (e.g. invoking interceptors bound using the deployment descriptor) around component construction.- Author:
- Jozef Hartinger
- See Also:
WeldCreationalContext.registerAroundConstructCallback(AroundConstructCallback)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description T
aroundConstruct(ConstructionHandle<T> handle, jakarta.enterprise.inject.spi.AnnotatedConstructor<T> constructor, Object[] parameters, Map<String,Object> data)
The method is called during component creation, allowing an integrator to perform additional steps (e.g.
-
-
-
Method Detail
-
aroundConstruct
T aroundConstruct(ConstructionHandle<T> handle, jakarta.enterprise.inject.spi.AnnotatedConstructor<T> constructor, Object[] parameters, Map<String,Object> data) throws Exception
The method is called during component creation, allowing an integrator to perform additional steps (e.g. invoking interceptors bound using the deployment descriptor) around component construction.- Parameters:
handle
- the handle for controlling the component creation process and retrieving the created instanceconstructor
- a representation of the component constructor used for component creationparameters
- the parameters that will be passed to the component constructor. These parameters should be made available toAroundConstruct
interceptors through theInvocationContext.getParameters()
method. An implementation is free to modify the parameters or provide a different parameter array to theConstructionHandle
.data
- the context data associated with thisAroundConstruct
interception. The data should be made available toAroundConstruct
interceptors throughInvocationContext.getContextData()
. An implementation is free to modify the map or to provide a different one to theConstructionHandle
.- Returns:
- the created instance
- Throws:
Exception
- any underlying exception is propagated directly
-
-