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 Type
    Method
    Description
    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. 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 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 instance
      constructor - a representation of the component constructor used for component creation
      parameters - the parameters that will be passed to the component constructor. These parameters should be made available to AroundConstruct interceptors through the InvocationContext.getParameters() method. An implementation is free to modify the parameters or provide a different parameter array to the ConstructionHandle.
      data - the context data associated with this AroundConstruct interception. The data should be made available to AroundConstruct interceptors through InvocationContext.getContextData(). An implementation is free to modify the map or to provide a different one to the ConstructionHandle.
      Returns:
      the created instance
      Throws:
      Exception - any underlying exception is propagated directly