Class ContextRegistrationPhaseBuildItem

java.lang.Object
io.quarkus.builder.item.BuildItem
io.quarkus.builder.item.SimpleBuildItem
io.quarkus.arc.deployment.ContextRegistrationPhaseBuildItem

public final class ContextRegistrationPhaseBuildItem extends io.quarkus.builder.item.SimpleBuildItem
Context registration phase can be used to register custom CDI contexts.

An extension that needs to produce other build items during the "context registration" phase should use this build item. The build step should produce a ContextRegistrationPhaseBuildItem.ContextConfiguratorBuildItem or at least inject a BuildProducer for this build item, otherwise it could be ignored or processed at the wrong time, e.g. after ArcProcessor.registerBeans(ContextRegistrationPhaseBuildItem, List, BuildProducer, BuildProducer, BuildProducer).

Typical workflow involves obtaining a ContextConfigurator via getContext().configure(). Note that there is no need to invoke ContextConfigurator.done() once you are done as it is performed automatically.

See Also: