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 a
WeldCreationalContext. Weld will then call the
aroundConstruct(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:
-
Method Summary
Modifier and TypeMethodDescriptionaroundConstruct(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. invoking interceptors bound using the deployment descriptor) around component construction.
-
Method Details
-
aroundConstruct
T aroundConstruct(ConstructionHandle<T> handle, jakarta.enterprise.inject.spi.AnnotatedConstructor<T> constructor, Object[] parameters, Map<String, Object> data) throws ExceptionThe 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 toAroundConstructinterceptors 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 thisAroundConstructinterception. The data should be made available toAroundConstructinterceptors 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
-