diff --git a/all/pom.xml b/all/pom.xml
index a053ff60e80..090c12118dc 100644
--- a/all/pom.xml
+++ b/all/pom.xml
@@ -1088,38 +1088,6 @@
io.helidon.builderhelidon-builder-codegen
-
- io.helidon.inject
- helidon-inject-api
-
-
- io.helidon.inject
- helidon-inject-tools
-
-
- io.helidon.inject
- helidon-inject-processor
-
-
- io.helidon.inject
- helidon-inject-testing
-
-
- io.helidon.inject
- helidon-inject-runtime
-
-
- io.helidon.inject.configdriven
- helidon-inject-configdriven-api
-
-
- io.helidon.inject.configdriven
- helidon-inject-configdriven-runtime
-
-
- io.helidon.inject.configdriven
- helidon-inject-configdriven-processor
- io.helidon.servicehelidon-service-metadata
@@ -1142,7 +1110,7 @@
io.helidon.integrations.oci.sdk
- helidon-integrations-oci-sdk-processor
+ helidon-integrations-oci-sdk-codegenio.helidon.integrations.oci.sdk
diff --git a/bom/pom.xml b/bom/pom.xml
index 1b2b21945fd..abdf40f0620 100644
--- a/bom/pom.xml
+++ b/bom/pom.xml
@@ -1441,50 +1441,6 @@
${helidon.version}
-
-
- io.helidon.inject
- helidon-inject-api
- ${helidon.version}
-
-
- io.helidon.inject
- helidon-inject-tools
- ${helidon.version}
-
-
- io.helidon.inject
- helidon-inject-processor
- ${helidon.version}
-
-
- io.helidon.inject
- helidon-inject-testing
- ${helidon.version}
-
-
- io.helidon.inject
- helidon-inject-runtime
- ${helidon.version}
-
-
-
-
- io.helidon.inject.configdriven
- helidon-inject-configdriven-api
- ${helidon.version}
-
-
- io.helidon.inject.configdriven
- helidon-inject-configdriven-runtime
- ${helidon.version}
-
-
- io.helidon.inject.configdriven
- helidon-inject-configdriven-processor
- ${helidon.version}
-
-
io.helidon.service
@@ -1517,7 +1473,7 @@
io.helidon.integrations.oci.sdk
- helidon-integrations-oci-sdk-processor
+ helidon-integrations-oci-sdk-codegen${helidon.version}
diff --git a/inject/README.md b/inject/README.md
deleted file mode 100644
index 21262fe8829..00000000000
--- a/inject/README.md
+++ /dev/null
@@ -1,9 +0,0 @@
-# helidon-inject
-
-Helidon inject is deprecated and will be replaced in a future version.
-Please do not use any of the modules.
-
-This feature was marked as preview, and we have decided to do a major refactoring in this area, which will be
-mostly backward incompatible.
-
-Sorry for this inconvenience.
\ No newline at end of file
diff --git a/inject/api/README.md b/inject/api/README.md
deleted file mode 100644
index 9faed5242be..00000000000
--- a/inject/api/README.md
+++ /dev/null
@@ -1,112 +0,0 @@
-This module contains all the API and SPI types that are applicable to a Helidon Injection based application.
-
-The API can logically be broken up into two categories - declarative types and imperative/programmatic types. The declarative form is the most common approach for using Injection.
-
-The declarative API is small and based upon annotations. This is because most of the supporting annotation types actually come directly from both of the standard javax/jakarta inject and javax/jakarta annotation modules. These standard annotations are supplemented with these proprietary annotation types offered here from Injection:
-
-* [@Contract](src/main/java/io/helidon/inject/api/Contract.java)
-* [@ExteralContracts](src/main/java/io/helidon/inject/api/ExternalContracts.java)
-* [@RunLevel](src/main/java/io/helidon/inject/api/RunLevel.java)
-
-The programmatic API is typically used to manually lookup and activate services (those that are typically annotated with @jakarta.inject.Singleton for example) directly. The main entry points for programmatic access can start from one of these two types:
-
-* [InjectionServices](src/main/java/io/helidon/inject/api/InjectionServices.java)
-* [Services](src/main/java/io/helidon/inject/api/Services.java)
-
-Note that this module only contains the common types for a Helidon Injection service provider. See the [runtime](../runtime) module for the default reference implementation for this API / SPI.
-
-## Declaring a Service
-
-### Singleton
-In this example the service is declared to be one-per JVM. Also note that ApplicationScoped is effectively the same as Singleton scoped services in a (micro)services framework such as Helidon.
-
-```java
-@jakarta.inject.Singleton
-class MySingletonService implements ServiceContract {
-}
-
-```
-
-Also note that in the above example ServiceContract is typically the Contract or ExternalContract definition - which is a way to signify lookup capabilities within the Services registry.
-
-### Provider
-Provider extends the Singleton to delegate dynamic behavior to service creation. In other frameworks this would typically be called a Factory, Producer, or PerLookup.
-
-```java
-@jakarta.inject.Singleton
-class MySingletonProvider implements jakarta.inject.Provider {
- @Override
- ServiceContract get() {
- ...
- }
-}
-```
-
-Helidon Injection delegates the cardinality of to the provider implementation for which instance to return to the caller. However, note that the instances returned are not "owned" by the Injection framework - unless those instances are looked up out of the Services registry.
-
-### InjectionPointProvider
-Here the standard jakarta.inject.Provider<> from above is extended to support contextual knowledge of "who is asking" to be injected with the service. In this way the provider implementation can provide the "right" instance based upon the caller's context.
-
-```java
-@Singleton
-@Named("*")
-public class BladeProvider implements InjectionPointProvider {
- @Override
- public Optional first(
- ContextualServiceQuery query) {
- ServiceInfoCriteria criteria = query.serviceInfoCriteria();
-
- AbstractBlade blade;
- if (criteria.qualifiers().contains(all) || criteria.qualifiers().contains(coarse)) {
- blade = new CoarseBlade();
- } else if (criteria.qualifiers().contains(fine)) {
- blade = new FineBlade();
- } else {
- assert (criteria.qualifiers().isEmpty());
- blade = new DullBlade();
- }
-
- return Optional.of(blade);
- }
-}
-```
-
-## Injectable Constructs
-Any service can declare field, method, or constructor injection points. The only caveat is that these injectable elements must either be public or package private. Generally speaking, it is considered a best practice to (a) use only an injectable constructor, and (b) only inject Provider instances. Here is an example for best practice depicting all possible usages for injection types supported by Helidon Injection.
-
-```java
-@Singleton
-public class MainToolBox implements ToolBox {
-
- // generally not recommended
- @Inject
- Provider anyHammerProvider;
-
- // the best practice is to generally to use only constructor injection with Provider-wrapped types
- @Inject
- MainToolBox(
- @Preferred Screwdriver screwdriver, // the qualifier restricts to the "preferred" screwdriver
- List> allTools, // all tools in proper weighted/ranked order
- @Named("big") Provider bigHammerProvider, // only the hammer provider qualified with name "big"
- List> allHammers, // all hammers in proper weighted/ranked order
- Optional maybeAChisel) // optionally a Chisel, activated
- {
- }
-
- // generally not recommended
- @Inject
- void setScrewdriver(Screwdriver screwdriver) {
- }
-
- // called after construction by Injection's lifecycle startup management
- @PostConstruct
- void postConstruct() {
- }
-
- // called before shutdown by Injection's lifecycle shutdown management
- @PreDestroy
- void preDestroy() {
- }
-}
-
-```
diff --git a/inject/api/pom.xml b/inject/api/pom.xml
deleted file mode 100644
index 65380a55837..00000000000
--- a/inject/api/pom.xml
+++ /dev/null
@@ -1,118 +0,0 @@
-
-
-
-
-
- io.helidon.inject
- helidon-inject-project
- 4.2.0-SNAPSHOT
-
- 4.0.0
-
- helidon-inject-api
- Helidon Injection API / SPI
-
-
-
- io.helidon.common
- helidon-common-types
-
-
- io.helidon.common
- helidon-common
-
-
- io.helidon.common
- helidon-common-config
-
-
- io.helidon.logging
- helidon-logging-common
-
-
- jakarta.inject
- jakarta.inject-api
- compile
-
-
- io.helidon.config
- helidon-config-metadata
- true
-
-
- io.helidon.builder
- helidon-builder-api
-
-
- jakarta.annotation
- jakarta.annotation-api
- provided
-
-
- io.helidon.common.testing
- helidon-common-testing-junit5
- test
-
-
- org.hamcrest
- hamcrest-all
- test
-
-
- org.junit.jupiter
- junit-jupiter-api
- test
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-compiler-plugin
-
-
-
- io.helidon.builder
- helidon-builder-processor
- ${helidon.version}
-
-
- io.helidon.common.processor
- helidon-common-processor-helidon-copyright
- ${helidon.version}
-
-
-
-
-
- io.helidon.builder
- helidon-builder-processor
- ${helidon.version}
-
-
- io.helidon.common.processor
- helidon-common-processor-helidon-copyright
- ${helidon.version}
-
-
-
-
-
-
diff --git a/inject/api/src/main/java/io/helidon/inject/api/ActivationLog.java b/inject/api/src/main/java/io/helidon/inject/api/ActivationLog.java
deleted file mode 100644
index 929adce355d..00000000000
--- a/inject/api/src/main/java/io/helidon/inject/api/ActivationLog.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2022, 2024 Oracle and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package io.helidon.inject.api;
-
-import java.util.Optional;
-
-/**
- * Tracks the transformations of {@link ServiceProvider}'s {@link ActivationStatus} in lifecycle activity (i.e., activation
- * startup and deactivation shutdown).
- *
- * @see Activator
- * @see DeActivator
- * @deprecated Helidon inject is deprecated and will be replaced in a future version
- */
-@Deprecated(forRemoval = true, since = "4.0.8")
-public interface ActivationLog {
-
- /**
- * Expected to be called during service creation and activation to capture the activation log transcripts.
- *
- * @param entry the log entry to record
- * @return the (perhaps decorated) activation log entry
- */
- ActivationLogEntry record(ActivationLogEntry entry);
-
- /**
- * Optionally provide a means to query the activation log, if query is possible. If query is not possible then an empty
- * will be returned.
- *
- * @return the optional query API of log activation records
- */
- default Optional toQuery() {
- return Optional.empty();
- }
-
-}
diff --git a/inject/api/src/main/java/io/helidon/inject/api/ActivationLogEntryBlueprint.java b/inject/api/src/main/java/io/helidon/inject/api/ActivationLogEntryBlueprint.java
deleted file mode 100644
index 5d5586d12b3..00000000000
--- a/inject/api/src/main/java/io/helidon/inject/api/ActivationLogEntryBlueprint.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * Copyright (c) 2022, 2024 Oracle and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package io.helidon.inject.api;
-
-import java.time.Instant;
-import java.util.Optional;
-
-import io.helidon.builder.api.Prototype;
-import io.helidon.config.metadata.ConfiguredOption;
-
-/**
- * Log entry for lifecycle related events (i.e., activation startup and deactivation shutdown).
- *
- * @see ActivationLog
- * @see Activator
- * @see DeActivator
- * @deprecated Helidon inject is deprecated and will be replaced in a future version
- */
-@Deprecated(forRemoval = true, since = "4.0.8")
-@Prototype.Blueprint(decorator = ActivationLogEntryBlueprint.BuilderDecorator.class)
-interface ActivationLogEntryBlueprint {
-
- /**
- * The event.
- *
- * @return the event
- */
- Event event();
-
- /**
- * Optionally, any special message being logged.
- *
- * @return the message
- */
- Optional message();
-
- /**
- * Optionally, when this log entry pertains to a service provider activation.
- *
- * @return the activation result
- */
- Optional activationResult();
-
- /**
- * Optionally, the managing service provider the event pertains to.
- *
- * @return the managing service provider
- */
- Optional> serviceProvider();
-
- /**
- * Optionally, the injection point that the event pertains to.
- *
- * @return the injection point
- */
- Optional injectionPoint();
-
- /**
- * The time this event was generated.
- *
- * @return the time of the event
- */
- Instant time();
-
- /**
- * Any observed error during activation.
- *
- * @return any observed error
- */
- Optional error();
-
- /**
- * The thread id that the event occurred on.
- *
- * @return the thread id
- */
- @ConfiguredOption("0")
- long threadId();
-
- /**
- * Ensures that the non-nullable fields are populated with default values.
- */
- class BuilderDecorator implements Prototype.BuilderDecorator> {
-
- BuilderDecorator() {
- }
-
- @Override
- public void decorate(ActivationLogEntry.BuilderBase, ?> b) {
- if (b.time().isEmpty()) {
- b.time(Instant.now());
- }
-
- if (b.threadId() == 0) {
- b.threadId(Thread.currentThread().threadId());
- }
-
- if (b.event().isEmpty()) {
- b.event(Event.FINISHED);
- }
- }
- }
-
-}
diff --git a/inject/api/src/main/java/io/helidon/inject/api/ActivationLogQuery.java b/inject/api/src/main/java/io/helidon/inject/api/ActivationLogQuery.java
deleted file mode 100644
index 407838f8154..00000000000
--- a/inject/api/src/main/java/io/helidon/inject/api/ActivationLogQuery.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (c) 2022, 2024 Oracle and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package io.helidon.inject.api;
-
-import java.util.List;
-
-/**
- * Provide a means to query the activation log.
- *
- * @see ActivationLog
- * @deprecated Helidon inject is deprecated and will be replaced in a future version
- */
-@Deprecated(forRemoval = true, since = "4.0.8")
-public interface ActivationLogQuery extends Resettable {
-
- /**
- * Clears the activation log.
- *
- * @param deep ignored
- * @return true if the log was cleared, false if the log was previously empty
- */
- @Override
- boolean reset(boolean deep);
-
- /**
- * The full transcript of all services phase transitions being managed.
- *
- * @return the activation log if log capture is enabled
- */
- List fullActivationLog();
-
-}
diff --git a/inject/api/src/main/java/io/helidon/inject/api/ActivationPhaseReceiver.java b/inject/api/src/main/java/io/helidon/inject/api/ActivationPhaseReceiver.java
deleted file mode 100644
index 687b05d019b..00000000000
--- a/inject/api/src/main/java/io/helidon/inject/api/ActivationPhaseReceiver.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 2022, 2024 Oracle and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package io.helidon.inject.api;
-
-/**
- * A receiver of events from the {@link Services} registry and providers held by the service registry.
- *
- * Note that only {@link ServiceProvider}'s implement this contract that are also bound to the global
- * {@link Services} registry are currently capable of receiving events.
- *
- * @see ServiceProviderBindable
- * @deprecated Helidon inject is deprecated and will be replaced in a future version
- */
-@Deprecated(forRemoval = true, since = "4.0.8")
-public interface ActivationPhaseReceiver {
-
- /**
- * Called when there is an event transition within the service registry.
- *
- * @param event the event
- * @param phase the phase
- */
- void onPhaseEvent(Event event,
- Phase phase);
-
-}
diff --git a/inject/api/src/main/java/io/helidon/inject/api/ActivationRequestBlueprint.java b/inject/api/src/main/java/io/helidon/inject/api/ActivationRequestBlueprint.java
deleted file mode 100644
index d0a5bc9607f..00000000000
--- a/inject/api/src/main/java/io/helidon/inject/api/ActivationRequestBlueprint.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright (c) 2022, 2024 Oracle and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package io.helidon.inject.api;
-
-import java.util.Optional;
-
-import io.helidon.builder.api.Prototype;
-import io.helidon.config.metadata.ConfiguredOption;
-
-/**
- * Request to activate a service.
- * @deprecated Helidon inject is deprecated and will be replaced in a future version
- */
-@Deprecated(forRemoval = true, since = "4.0.8")
-@Prototype.Blueprint
-interface ActivationRequestBlueprint {
-
- /**
- * Optionally, the injection point context information.
- *
- * @return injection point info
- */
- Optional injectionPoint();
-
- /**
- * The phase to start activation. Typically, this should be left as the default (i.e., PENDING).
- *
- * @return phase to start
- */
- Optional startingPhase();
-
- /**
- * Ultimate target phase for activation.
- *
- * @return phase to target
- */
- @ConfiguredOption("ACTIVE")
- Phase targetPhase();
-
- /**
- * Whether to throw an exception on failure to activate, or return an error activation result on activation.
- *
- * @return whether to throw on failure
- */
- @ConfiguredOption("true")
- boolean throwIfError();
-}
diff --git a/inject/api/src/main/java/io/helidon/inject/api/ActivationResultBlueprint.java b/inject/api/src/main/java/io/helidon/inject/api/ActivationResultBlueprint.java
deleted file mode 100644
index b230f6aa9c4..00000000000
--- a/inject/api/src/main/java/io/helidon/inject/api/ActivationResultBlueprint.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * Copyright (c) 2022, 2024 Oracle and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package io.helidon.inject.api;
-
-import java.util.Map;
-import java.util.Optional;
-import java.util.concurrent.Future;
-
-import io.helidon.builder.api.Prototype;
-import io.helidon.config.metadata.ConfiguredOption;
-
-/**
- * Represents the result of a service activation or deactivation.
- *
- * @see Activator
- * @see DeActivator
- * @deprecated Helidon inject is deprecated and will be replaced in a future version
- */
-@Deprecated(forRemoval = true, since = "4.0.8")
-@Prototype.Blueprint
-interface ActivationResultBlueprint {
-
- /**
- * The service provider undergoing activation or deactivation.
- *
- * @return the service provider generating the result
- */
- ServiceProvider> serviceProvider();
-
- /**
- * Optionally, given by the implementation provider to indicate the future completion when the provider's
- * {@link ActivationStatus} is {@link ActivationStatus#WARNING_SUCCESS_BUT_NOT_READY}.
- *
- * @return the future result, assuming how activation can be async in nature
- */
- Optional> finishedActivationResult();
-
- /**
- * The activation phase that was found at onset of the phase transition.
- *
- * @return the starting phase
- */
- @ConfiguredOption("INIT")
- Phase startingActivationPhase();
-
- /**
- * The activation phase that was requested at the onset of the phase transition.
- *
- * @return the target, desired, ultimate phase requested
- */
- @ConfiguredOption("INIT")
- Phase targetActivationPhase();
-
- /**
- * The activation phase we finished successfully on, or are otherwise currently in if not yet finished.
- *
- * @return the finishing phase
- */
- Phase finishingActivationPhase();
-
- /**
- * How did the activation finish.
- * Will only be populated if the lifecycle event has completed - see {@link #finishedActivationResult()}.
- *
- * @return the finishing status
- */
- Optional finishingStatus();
-
- /**
- * The injection plan that was found or determined, key'ed by each element's {@link ServiceProvider#id()}.
- *
- * @return the resolved injection plan map
- */
- Map injectionPlans();
-
- /**
- * The dependencies that were resolved or loaded, key'ed by each element's {@link ServiceProvider#id()}.
- *
- * @return the resolved dependency map
- */
- Map resolvedDependencies();
-
- /**
- * Set to true if the injection plan in {@link #resolvedDependencies()} has been resolved and can be "trusted" as being
- * complete and accurate.
- *
- * @return true if was resolved
- */
- @ConfiguredOption("false")
- boolean wasResolved();
-
- /**
- * Any throwable/exceptions that were observed during activation.
- *
- * @return any captured error
- */
- Optional error();
-
- /**
- * Returns true if this result is finished.
- *
- * @return true if finished
- */
- default boolean finished() {
- Future f = finishedActivationResult().orElse(null);
- return (f == null || f.isDone());
- }
-
- /**
- * Returns true if this result was successful.
- *
- * @return true if successful
- */
- default boolean success() {
- return finishingStatus().orElse(null) != ActivationStatus.FAILURE;
- }
-
- /**
- * Returns true if this result was unsuccessful.
- *
- * @return true if unsuccessful
- */
- default boolean failure() {
- return !success();
- }
-}
diff --git a/inject/api/src/main/java/io/helidon/inject/api/ActivationStatus.java b/inject/api/src/main/java/io/helidon/inject/api/ActivationStatus.java
deleted file mode 100644
index 255d695ce87..00000000000
--- a/inject/api/src/main/java/io/helidon/inject/api/ActivationStatus.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 2022, 2024 Oracle and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package io.helidon.inject.api;
-
-/**
- * The activation status. This status applies to the {@link ActivationLogEntry} record.
- *
- * @see Activator
- * @deprecated Helidon inject is deprecated and will be replaced in a future version
- */
-@Deprecated(forRemoval = true, since = "4.0.8")
-public enum ActivationStatus {
-
- /**
- * The service has been activated and is fully ready to receive requests.
- */
- SUCCESS,
-
- /**
- * The service has been activated but is still being started asynchronously, and is not fully ready yet to receive requests.
- * Important note: This is NOT health related - Health is orthogonal to service bindings/activation and readiness.
- */
- WARNING_SUCCESS_BUT_NOT_READY,
-
- /**
- * A general warning during lifecycle.
- */
- WARNING_GENERAL,
-
- /**
- * Failed to activate to the given phase.
- */
- FAILURE
-
-}
diff --git a/inject/api/src/main/java/io/helidon/inject/api/Activator.java b/inject/api/src/main/java/io/helidon/inject/api/Activator.java
deleted file mode 100644
index 79888c80179..00000000000
--- a/inject/api/src/main/java/io/helidon/inject/api/Activator.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (c) 2022, 2024 Oracle and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package io.helidon.inject.api;
-
-/**
- * Activators are responsible for lifecycle creation and lazy activation of service providers. They are responsible for taking the
- * {@link ServiceProvider}'s manage service instance from {@link Phase#PENDING}
- * through {@link Phase#POST_CONSTRUCTING} (i.e., including any
- * {@link PostConstructMethod} invocations, etc.), and finally into the
- * {@link Phase#ACTIVE} phase.
- *
- * Assumption:
- *
- *
Each {@link ServiceProvider} managing its backing service will have an activator strategy conforming to the DI
- * specification.
- *
Each services activation is expected to be non-blocking, but may in fact require deferred blocking activities to become
- * fully ready for runtime operation.
- *
- * Activation includes:
- *
- *
Management of the service's {@link Phase}.
- *
Control over creation (i.e., invoke the constructor non-reflectively).
- *
Control over gathering the service requisite dependencies (ctor, field, setters) and optional activation of those.
- *
Invocation of any {@link PostConstructMethod}.
- *
Responsible to logging to the {@link ActivationLog} - see {@link InjectionServices#activationLog()}.
- *
- *
- * @see DeActivator
- * @deprecated Helidon inject is deprecated and will be replaced in a future version
- */
-@Deprecated(forRemoval = true, since = "4.0.8")
-public interface Activator {
-
- /**
- * Activate a managed service/provider.
- *
- * @param activationRequest activation request
- * @return the result of the activation
- */
- ActivationResult activate(ActivationRequest activationRequest);
-
-}
diff --git a/inject/api/src/main/java/io/helidon/inject/api/Application.java b/inject/api/src/main/java/io/helidon/inject/api/Application.java
deleted file mode 100644
index 1c10a2c1425..00000000000
--- a/inject/api/src/main/java/io/helidon/inject/api/Application.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 2022, 2024 Oracle and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package io.helidon.inject.api;
-
-/**
- * An Application instance, if available at runtime, will be expected to provide a blueprint for all service provider's injection
- * points.
- *
- * Implementations of this contract are normally code generated, although then can be programmatically written by the developer
- * for special cases.
- *
- * Note: instances of this type are not eligible for injection.
- *
- * @see ModuleComponent
- * @deprecated Helidon inject is deprecated and will be replaced in a future version
- */
-@Deprecated(forRemoval = true, since = "4.0.8")
-@Contract
-public interface Application extends OptionallyNamed {
-
- /**
- * Called by the provider implementation at bootstrapping time to bind all injection plans to each and every service provider.
- *
- * @param binder the binder used to register the service provider injection plans
- */
- void configure(ServiceInjectionPlanBinder binder);
-
-}
diff --git a/inject/api/src/main/java/io/helidon/inject/api/BootstrapBlueprint.java b/inject/api/src/main/java/io/helidon/inject/api/BootstrapBlueprint.java
deleted file mode 100644
index 56ffa395a5c..00000000000
--- a/inject/api/src/main/java/io/helidon/inject/api/BootstrapBlueprint.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 2022, 2024 Oracle and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package io.helidon.inject.api;
-
-import java.util.Optional;
-
-import io.helidon.builder.api.Prototype;
-import io.helidon.common.config.Config;
-
-/**
- * This is the bootstrap needed to provide to {@code Services} initialization.
- *
- * @see io.helidon.inject.spi.InjectionServicesProvider
- * @see io.helidon.inject.api.InjectionServices#globalBootstrap()
- * @deprecated Helidon inject is deprecated and will be replaced in a future version
- */
-@Deprecated(forRemoval = true, since = "4.0.8")
-@Prototype.Blueprint
-interface BootstrapBlueprint {
-
- /**
- * Provides the base primordial bootstrap configuration to the {@link io.helidon.inject.spi.InjectionServicesProvider}.
- * The provider will then bootstrap {@link InjectionServices} using this bootstrap instance.
- * then default values will be used accordingly.
- *
- * @return the bootstrap helidon configuration
- */
- Optional config();
-
- /**
- * In certain conditions Injection services should be initialized but not started (i.e., avoiding calls to {@code PostConstruct}
- * etc.). This can be used in special cases where the normal Injection startup should limit lifecycle up to a given phase. Normally
- * one should not use this feature - it is mainly used in Injection tooling (e.g., the injection maven-plugin).
- *
- * @return the phase to stop at during lifecycle
- */
- Optional limitRuntimePhase();
-
-}
diff --git a/inject/api/src/main/java/io/helidon/inject/api/CallingContextBlueprint.java b/inject/api/src/main/java/io/helidon/inject/api/CallingContextBlueprint.java
deleted file mode 100644
index c0233dd7aa5..00000000000
--- a/inject/api/src/main/java/io/helidon/inject/api/CallingContextBlueprint.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Copyright (c) 2023, 2024 Oracle and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package io.helidon.inject.api;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Optional;
-
-import io.helidon.builder.api.Prototype;
-
-/**
- * For internal use only to Helidon. Applicable when {@link InjectionServices#TAG_DEBUG} is enabled.
- * @deprecated Helidon inject is deprecated and will be replaced in a future version
- */
-@Deprecated(forRemoval = true, since = "4.0.8")
-@Prototype.Blueprint(decorator = CallingContextBlueprint.BuilderDecorator.class)
-interface CallingContextBlueprint {
- /**
- * Only populated when {@link InjectionServices#TAG_DEBUG} is set.
- *
- * @return the stack trace for who initialized
- */
- Optional stackTrace();
-
- /**
- * Only populated when {@code module} is set.
- *
- * @return the module name
- */
- Optional moduleName();
-
- /**
- * The thread that created the calling context.
- *
- * @return thread creating the calling context
- */
- String threadName();
-
- /**
- * Returns a stack trace as a list of strings.
- *
- * @return the list of strings for the stack trace, or empty list if not available
- */
- default List stackTraceAsList() {
- return stackTrace().map(stackTrace -> {
- List result = new ArrayList<>();
- for (StackTraceElement e : stackTrace) {
- result.add(e.toString());
- }
- return result;
- })
- .orElseGet(List::of);
- }
-
- class BuilderDecorator implements Prototype.BuilderDecorator> {
- @Override
- public void decorate(CallingContext.BuilderBase, ?> target) {
- if (target.threadName().isEmpty()) {
- target.threadName(Thread.currentThread().getName());
- }
- }
- }
-
-}
diff --git a/inject/api/src/main/java/io/helidon/inject/api/CallingContextFactory.java b/inject/api/src/main/java/io/helidon/inject/api/CallingContextFactory.java
deleted file mode 100644
index f6d9fa543ed..00000000000
--- a/inject/api/src/main/java/io/helidon/inject/api/CallingContextFactory.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Copyright (c) 2023, 2024 Oracle and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package io.helidon.inject.api;
-
-import java.util.Objects;
-import java.util.Optional;
-
-/**
- * Factory for creating {@link CallingContext} and builders for the calling context.
- * After a calling context builder is created, it should be amended with as much contextual information as possible, and then
- * optionally set globally using {@link #globalCallingContext(CallingContext, boolean)}.
- * @deprecated Helidon inject is deprecated and will be replaced in a future version
- */
-@Deprecated(forRemoval = true, since = "4.0.8")
-public class CallingContextFactory {
- private static volatile CallingContext defaultCallingContext;
-
- private CallingContextFactory() {
- }
-
- /**
- * Sets the default global calling context.
- *
- * @param callingContext the default global context
- * @param throwIfAlreadySet should an exception be thrown if the global calling context was already set
- * @throws java.lang.IllegalStateException if context was already set and the throwIfAlreadySet is active
- */
- public static void globalCallingContext(CallingContext callingContext,
- boolean throwIfAlreadySet) {
- Objects.requireNonNull(callingContext);
-
- CallingContext global = defaultCallingContext;
- if (global != null && throwIfAlreadySet) {
- CallingContext currentCallingContext = CallingContextFactory.create(true).orElseThrow();
- throw new IllegalStateException("Expected to be the owner of the calling context. This context is: "
- + currentCallingContext + "\n Context previously set was: " + global);
- }
-
- CallingContextFactory.defaultCallingContext = callingContext;
- }
-
- /**
- * Creates a new calling context instance. Normally this method will return a context optionally only when debug is
- * enabled. This behavior can be overridden by passing the {@code force=true} flag.
- *
- * @param force forces the creation of the calling context even when debug is disabled
- * @return a new calling context if there is an indication that debug mode is enabled, or if the force flag is set
- * @see InjectionServicesConfig#debug()
- */
- public static Optional create(boolean force) {
- Optional optBuilder = createBuilder(force);
- return optBuilder.map(CallingContext.Builder::build);
-
- }
-
- /**
- * Creates a new calling context builder instance. Normally this method will return a context builder optionally only when
- * debug is enabled. This behavior can be overridden by passing the {@code force=true} flag.
- *
- * @param force forces the creation of the calling context even when debug is disabled
- * @return a new calling context builder if there is an indication that debug mode is enabled, or if the force flag is set
- * @see InjectionServicesConfig#debug()
- */
- public static Optional createBuilder(boolean force) {
- if (force || InjectionServices.injectionServices()
- .map(InjectionServices::config)
- .map(InjectionServicesConfig::shouldDebug)
- .orElse(false)) {
-
- return Optional.of(CallingContext.builder()
- .stackTrace(new RuntimeException().getStackTrace()));
- }
- return Optional.empty();
- }
-
-}
diff --git a/inject/api/src/main/java/io/helidon/inject/api/ClassNamed.java b/inject/api/src/main/java/io/helidon/inject/api/ClassNamed.java
deleted file mode 100644
index 9a745aafda5..00000000000
--- a/inject/api/src/main/java/io/helidon/inject/api/ClassNamed.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 2023, 2024 Oracle and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package io.helidon.inject.api;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-
-import jakarta.inject.Named;
-import jakarta.inject.Qualifier;
-
-/**
- * This annotation is effectively the same as {@link jakarta.inject.Named} where the {@link Named#value()} is a {@link Class}
- * name instead of a {@link String}.
- * @deprecated Helidon inject is deprecated and will be replaced in a future version
- */
-@Deprecated(forRemoval = true, since = "4.0.8")
-@Qualifier
-@Documented
-@Retention(RetentionPolicy.RUNTIME)
-public @interface ClassNamed {
-
- /**
- * The class used will function as the name.
- *
- * @return the class
- */
- Class> value();
-
-}
diff --git a/inject/api/src/main/java/io/helidon/inject/api/CommonQualifiers.java b/inject/api/src/main/java/io/helidon/inject/api/CommonQualifiers.java
deleted file mode 100644
index aae90540075..00000000000
--- a/inject/api/src/main/java/io/helidon/inject/api/CommonQualifiers.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (c) 2023, 2024 Oracle and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package io.helidon.inject.api;
-
-import io.helidon.common.types.TypeName;
-
-import jakarta.inject.Named;
-
-/**
- * Commonly used {@link Qualifier} types.
- * @deprecated Helidon inject is deprecated and will be replaced in a future version
- */
-@Deprecated(forRemoval = true, since = "4.0.8")
-public final class CommonQualifiers {
-
- /**
- * Represents a {@link jakarta.inject.Named} type name with no value.
- */
- public static final TypeName NAMED = TypeName.create(Named.class);
-
- /**
- * Represents a wildcard (i.e., matches anything).
- */
- public static final String WILDCARD = "*";
-
- /**
- * Represents a wildcard {@link #NAMED} qualifier.
- */
- public static final Qualifier WILDCARD_NAMED = Qualifier.createNamed(WILDCARD);
-
- private CommonQualifiers() {
- }
-
-}
diff --git a/inject/api/src/main/java/io/helidon/inject/api/ContextualServiceQueryBlueprint.java b/inject/api/src/main/java/io/helidon/inject/api/ContextualServiceQueryBlueprint.java
deleted file mode 100644
index 14ce4c494b7..00000000000
--- a/inject/api/src/main/java/io/helidon/inject/api/ContextualServiceQueryBlueprint.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright (c) 2022, 2024 Oracle and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package io.helidon.inject.api;
-
-import java.util.Objects;
-import java.util.Optional;
-
-import io.helidon.builder.api.Prototype;
-
-/**
- * Combines the {@link ServiceInfo} criteria along with the {@link InjectionPointInfo} context
- * that the query applies to.
- *
- * @see InjectionPointProvider
- * @deprecated Helidon inject is deprecated and will be replaced in a future version
- */
-@Deprecated(forRemoval = true, since = "4.0.8")
-@Prototype.Blueprint
-@Prototype.CustomMethods(ContextualServiceQueryBlueprint.CustomMethods.class)
-interface ContextualServiceQueryBlueprint {
-
- /**
- * The criteria to use for the lookup into {@link Services}.
- *
- * @return the service info criteria
- */
- ServiceInfoCriteria serviceInfoCriteria();
-
- /**
- * Optionally, the injection point context this search applies to.
- *
- * @return the optional injection point context info
- */
- Optional injectionPointInfo();
-
- /**
- * Set to true if there is an expectation that there is at least one match result from the search.
- *
- * @return true if it is expected there is at least a single match result
- */
- boolean expected();
-
- final class CustomMethods {
- private CustomMethods() {
- }
-
- /**
- * Creates a contextual service query given the injection point info.
- *
- * @param ipInfo the injection point info
- * @param expected true if the query is expected to at least have a single match
- * @return the query
- */
- @Prototype.FactoryMethod
- static ContextualServiceQuery create(InjectionPointInfo ipInfo,
- boolean expected) {
- Objects.requireNonNull(ipInfo);
- return ContextualServiceQuery.builder()
- .expected(expected)
- .injectionPointInfo(ipInfo)
- .serviceInfoCriteria(ipInfo.dependencyToServiceInfo())
- .build();
- }
- }
-}
diff --git a/inject/api/src/main/java/io/helidon/inject/api/Contract.java b/inject/api/src/main/java/io/helidon/inject/api/Contract.java
deleted file mode 100644
index 6410802dd9c..00000000000
--- a/inject/api/src/main/java/io/helidon/inject/api/Contract.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 2022, 2024 Oracle and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package io.helidon.inject.api;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * The {@code Contract} annotation is used to relay significance to the type that it annotates. While remaining optional in its
- * use, it is typically placed on an interface definition to signify that the given type can be used for lookup in the
- * {@link Services} registry, and be eligible for injection via standard {@code @Inject}.
- * While normally placed on interface types, it can also be placed on abstract and concrete class as well. The main point is that
- * a {@code Contract} is the focal point for service lookup and injection.
- *
- * If the developer does not have access to the source to place this annotation on the interface definition directly then consider
- * using {@link ExternalContracts} instead - this annotation can be placed on the implementation class implementing the given
- * {@code Contract} interface(s).
- *
- * @see ServiceInfo#contractsImplemented()
- * @see ServiceInfo#externalContractsImplemented()
- * @deprecated Helidon inject is deprecated and will be replaced in a future version
- */
-@Deprecated(forRemoval = true, since = "4.0.8")
-@Documented
-@Retention(RetentionPolicy.CLASS)
-@Target(java.lang.annotation.ElementType.TYPE)
-public @interface Contract {
-
-}
diff --git a/inject/api/src/main/java/io/helidon/inject/api/DeActivationRequestBlueprint.java b/inject/api/src/main/java/io/helidon/inject/api/DeActivationRequestBlueprint.java
deleted file mode 100644
index 60ed27266ba..00000000000
--- a/inject/api/src/main/java/io/helidon/inject/api/DeActivationRequestBlueprint.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright (c) 2022, 2024 Oracle and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package io.helidon.inject.api;
-
-import io.helidon.builder.api.Prototype;
-import io.helidon.config.metadata.ConfiguredOption;
-
-/**
- * Request to deactivate a {@link ServiceProvider}.
- * @deprecated Helidon inject is deprecated and will be replaced in a future version
- */
-@Deprecated(forRemoval = true, since = "4.0.8")
-@Prototype.Blueprint
-interface DeActivationRequestBlueprint {
- /**
- * Whether to throw an exception on failure, or return it as part of the result.
- *
- * @return throw on failure
- */
- @ConfiguredOption("true")
- boolean throwIfError();
-}
diff --git a/inject/api/src/main/java/io/helidon/inject/api/DeActivator.java b/inject/api/src/main/java/io/helidon/inject/api/DeActivator.java
deleted file mode 100644
index 93e22d5cb1d..00000000000
--- a/inject/api/src/main/java/io/helidon/inject/api/DeActivator.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 2022, 2024 Oracle and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package io.helidon.inject.api;
-
-/**
- * DeActivators are responsible for lifecycle, transitioning a {@link ServiceProvider} through its
- * {@link Phase}'s, notably including any
- * {@link jakarta.annotation.PreDestroy} method invocations, and finally into the terminal
- * {@link Phase#DESTROYED} phase. These phase transitions are the inverse of {@link Activator}.
- *
- * @see Activator
- * @deprecated Helidon inject is deprecated and will be replaced in a future version
- */
-@Deprecated(forRemoval = true, since = "4.0.8")
-public interface DeActivator {
-
- /**
- * Deactivate a managed service. This will trigger any {@link jakarta.annotation.PreDestroy} method on the
- * underlying service type instance.
- *
- * @param request deactivation request
- * @return the result
- */
- ActivationResult deactivate(DeActivationRequest request);
-
-}
diff --git a/inject/api/src/main/java/io/helidon/inject/api/DependenciesInfoBlueprint.java b/inject/api/src/main/java/io/helidon/inject/api/DependenciesInfoBlueprint.java
deleted file mode 100644
index 055bdb29e1a..00000000000
--- a/inject/api/src/main/java/io/helidon/inject/api/DependenciesInfoBlueprint.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright (c) 2022, 2024 Oracle and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package io.helidon.inject.api;
-
-import java.util.List;
-import java.util.Map;
-import java.util.Objects;
-import java.util.Optional;
-import java.util.Set;
-import java.util.TreeSet;
-import java.util.stream.Collectors;
-
-import io.helidon.builder.api.Option;
-import io.helidon.builder.api.Prototype;
-import io.helidon.common.types.TypeName;
-
-/**
- * Represents a per {@link ServiceInfo} mapping of {@link DependencyInfo}'s. These are typically assigned to a
- * {@link ServiceProvider} via compile-time code generation within the Injection framework.
- * @deprecated Helidon inject is deprecated and will be replaced in a future version
- */
-@Deprecated(forRemoval = true, since = "4.0.8")
-@Prototype.Blueprint
-interface DependenciesInfoBlueprint {
- /**
- * Represents the set of dependencies for each {@link ServiceInfo}.
- *
- * @return map from the service info to its dependencies
- */
- @Option.Singular("serviceInfoDependency")
- Map> serviceInfoDependencies();
-
- /**
- * Optionally, the service type name aggregating {@link #allDependencies()}.
- *
- * @return the optional service type name for which these dependencies belong
- */
- Optional fromServiceTypeName();
-
- /**
- * Represents a flattened set of all dependencies.
- *
- * @return the flattened set of all dependencies
- */
- default Set allDependencies() {
- Set all = new TreeSet<>(DependencyInfoComparator.instance());
- serviceInfoDependencies().values()
- .forEach(all::addAll);
- return all;
- }
-
- /**
- * Represents the list of all dependencies for a given injection point element name ordered by the element position.
- *
- * @param elemName the element name of the injection point
- * @return the list of all dependencies got a given element name of a given injection point
- */
- default List allDependenciesFor(String elemName) {
- Objects.requireNonNull(elemName);
- return allDependencies().stream()
- .flatMap(dep -> dep.injectionPointDependencies().stream()
- .filter(ipi -> elemName.equals(ipi.elementName()))
- .map(ipi -> DependencyInfo.builder(dep)
- .injectionPointDependencies(Set.of(ipi))
- .build()))
- .sorted(DependencyInfoComparator.instance())
- .collect(Collectors.toList());
- }
-
-}
diff --git a/inject/api/src/main/java/io/helidon/inject/api/DependencyInfoBlueprint.java b/inject/api/src/main/java/io/helidon/inject/api/DependencyInfoBlueprint.java
deleted file mode 100644
index 8ffa8ff0cbe..00000000000
--- a/inject/api/src/main/java/io/helidon/inject/api/DependencyInfoBlueprint.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (c) 2022, 2024 Oracle and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package io.helidon.inject.api;
-
-import java.util.Optional;
-import java.util.Set;
-
-import io.helidon.builder.api.Option;
-import io.helidon.builder.api.Prototype;
-import io.helidon.config.metadata.ConfiguredOption;
-
-/**
- * Aggregates the set of {@link InjectionPointInfo}'s that are dependent upon a specific and common
- * {@link ServiceInfo} definition.
- * @deprecated Helidon inject is deprecated and will be replaced in a future version
- */
-@Deprecated(forRemoval = true, since = "4.0.8")
-@Prototype.Blueprint
-interface DependencyInfoBlueprint {
- /**
- * Name of the dependency location, such as a field name, or argument name.
- *
- * @return name of the element of this dependency
- */
- String elementName();
-
- /**
- * The service info describing what the injection point dependencies are dependent upon.
- *
- * @return the service info dependency
- */
- @ConfiguredOption(required = true)
- ServiceInfoCriteria dependencyTo();
-
- /**
- * The set of injection points that depends upon {@link #dependencyTo()}.
- *
- * @return the set of dependencies
- */
- @Option.Singular("injectionPointDependency")
- Set injectionPointDependencies();
-
- /**
- * The {@link ServiceProvider} that this dependency is optional resolved and bound to. All dependencies
- * from {@link #injectionPointDependencies()} will be bound to this resolution.
- *
- * @return the optional resolved and bounded service provider
- */
- Optional> resolvedTo();
-
-}
diff --git a/inject/api/src/main/java/io/helidon/inject/api/DependencyInfoComparator.java b/inject/api/src/main/java/io/helidon/inject/api/DependencyInfoComparator.java
deleted file mode 100644
index afb7c666646..00000000000
--- a/inject/api/src/main/java/io/helidon/inject/api/DependencyInfoComparator.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 2023, 2024 Oracle and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package io.helidon.inject.api;
-
-import java.io.Serializable;
-import java.util.Comparator;
-
-/**
- * Comparator appropriate for {@link DependencyInfo}.
- * @deprecated Helidon inject is deprecated and will be replaced in a future version
- */
-@Deprecated(forRemoval = true, since = "4.0.8")
-public class DependencyInfoComparator implements java.util.Comparator, Serializable {
- private static final Comparator INSTANCE = new DependencyInfoComparator();
-
- private DependencyInfoComparator() {
- }
-
- /**
- * Dependency info comparator.
- *
- * @return instance of the comparator
- */
- public static Comparator instance() {
- return INSTANCE;
- }
-
- @Override
- public int compare(DependencyInfo o1,
- DependencyInfo o2) {
- InjectionPointInfo ipi1 = o1.injectionPointDependencies().iterator().next();
- InjectionPointInfo ipi2 = o2.injectionPointDependencies().iterator().next();
-
- java.util.Comparator idComp = java.util.Comparator.comparing(InjectionPointInfo::baseIdentity);
- java.util.Comparator posComp =
- java.util.Comparator.comparing(DependencyInfoComparator::elementOffsetOf);
-
- return idComp.thenComparing(posComp).compare(ipi1, ipi2);
- }
-
- private static int elementOffsetOf(InjectionPointInfo ipi) {
- return ipi.elementOffset().orElse(0);
- }
-}
diff --git a/inject/api/src/main/java/io/helidon/inject/api/ElementInfoBlueprint.java b/inject/api/src/main/java/io/helidon/inject/api/ElementInfoBlueprint.java
deleted file mode 100644
index c9fb39a489b..00000000000
--- a/inject/api/src/main/java/io/helidon/inject/api/ElementInfoBlueprint.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * Copyright (c) 2022, 2024 Oracle and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package io.helidon.inject.api;
-
-import java.util.Optional;
-import java.util.Set;
-
-import io.helidon.builder.api.Option;
-import io.helidon.builder.api.Prototype;
-import io.helidon.common.types.AccessModifier;
-import io.helidon.common.types.Annotation;
-import io.helidon.common.types.TypeName;
-import io.helidon.config.metadata.ConfiguredOption;
-
-/**
- * Abstractly describes method or field elements of a managed service type (i.e., fields, constructors, injectable methods, etc.).
- * @deprecated Helidon inject is deprecated and will be replaced in a future version
- */
-@Deprecated(forRemoval = true, since = "4.0.8")
-@Prototype.Blueprint
-interface ElementInfoBlueprint {
-
- /**
- * The name assigned to constructors.
- */
- String CONSTRUCTOR = "";
-
- /**
- * The injection point/receiver kind.
- *
- * @return the kind
- */
- ElementKind elementKind();
-
- /**
- * The access modifier on the injection point/receiver.
- *
- * @return the access
- */
- AccessModifier access();
-
- /**
- * The element type name (e.g., method type or field type).
- *
- * @return the target receiver type name
- */
- TypeName elementTypeName();
-
- /**
- * The element name (e.g., method name or field name).
- *
- * @return the target receiver name
- */
- String elementName();
-
- /**
- * If the element is a method or constructor then this is the ordinal argument position of that argument.
- *
- * @return the offset argument, 0 based, or empty if field type
- */
- Optional elementOffset();
-
- /**
- * If the element is a method or constructor then this is the total argument count for that method.
- *
- * @return total argument count
- */
- Optional elementArgs();
-
- /**
- * True if the injection point is static.
- *
- * @return true if static receiver
- */
- @ConfiguredOption("false")
- boolean staticDeclaration();
-
- /**
- * The enclosing class name for the element.
- *
- * @return service type name
- */
- TypeName serviceTypeName();
-
- /**
- * The annotations on this element.
- *
- * @return the annotations on this element
- */
- @Option.Singular
- Set annotations();
-
- /**
- * The qualifier type annotations on this element.
- *
- * @return the qualifier type annotations on this element
- */
- @Option.Singular
- Set qualifiers();
-
-}
diff --git a/inject/api/src/main/java/io/helidon/inject/api/ElementKind.java b/inject/api/src/main/java/io/helidon/inject/api/ElementKind.java
deleted file mode 100644
index 04c42d6f1c6..00000000000
--- a/inject/api/src/main/java/io/helidon/inject/api/ElementKind.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (c) 2023, 2024 Oracle and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package io.helidon.inject.api;
-
-/**
- * The kind of injection target.
- * @deprecated Helidon inject is deprecated and will be replaced in a future version
- */
-@Deprecated(forRemoval = true, since = "4.0.8")
-public enum ElementKind {
- /**
- * The injectable constructor. Note that there can be at most 1 injectable constructor.
- */
- CONSTRUCTOR,
-
- /**
- * A field.
- */
- FIELD,
-
- /**
- * A method.
- */
- METHOD
-}
diff --git a/inject/api/src/main/java/io/helidon/inject/api/ExternalContracts.java b/inject/api/src/main/java/io/helidon/inject/api/ExternalContracts.java
deleted file mode 100644
index af571e43772..00000000000
--- a/inject/api/src/main/java/io/helidon/inject/api/ExternalContracts.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 2022, 2024 Oracle and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package io.helidon.inject.api;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * Placed on the implementation of a service as an alternative to using a {@link Contract}.
- *
- * Use this annotation when it is impossible to place an annotation on the interface itself - for instance of the interface comes
- * from a 3rd party library provider.
- * @deprecated Helidon inject is deprecated and will be replaced in a future version
- */
-@Deprecated(forRemoval = true, since = "4.0.8")
-@Documented
-@Retention(RetentionPolicy.CLASS)
-@Target(java.lang.annotation.ElementType.TYPE)
-public @interface ExternalContracts {
-
- /**
- * The advertised contract type(s) for the service class implementation.
- *
- * @return the external contract(s)
- */
- Class>[] value();
-
- /**
- * The optional set of module names where this contract is expected to reside.
- *
- * @return the optional module names
- */
- String[] moduleNames() default {};
-
-}
diff --git a/inject/api/src/main/java/io/helidon/inject/api/Helidon.java b/inject/api/src/main/java/io/helidon/inject/api/Helidon.java
deleted file mode 100644
index d8de355e6a9..00000000000
--- a/inject/api/src/main/java/io/helidon/inject/api/Helidon.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * Copyright (c) 2023, 2024 Oracle and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package io.helidon.inject.api;
-
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.locks.ReentrantReadWriteLock;
-
-import io.helidon.common.config.Config;
-import io.helidon.common.config.GlobalConfig;
-import io.helidon.logging.common.LogConfig;
-
-/**
- * Entry point to service registry based Helidon applications.
- *
- * @see #start()
- * @see #serviceRegistry()
- * @deprecated Helidon inject is deprecated and will be replaced in a future version
- */
-@Deprecated(forRemoval = true, since = "4.0.8")
-public class Helidon {
- private static final System.Logger LOGGER = System.getLogger(Helidon.class.getName());
- private static final ReentrantReadWriteLock REENTRANT_READ_WRITE_LOCK = new ReentrantReadWriteLock();
- private static final ReentrantReadWriteLock.ReadLock READ_LOCK = REENTRANT_READ_WRITE_LOCK.readLock();
- private static final ReentrantReadWriteLock.WriteLock WRITE_LOCK = REENTRANT_READ_WRITE_LOCK.writeLock();
- private static final AtomicBoolean BASIC_INIT_DONE = new AtomicBoolean();
- private static final AtomicBoolean REGISTRY_INITIALIZED = new AtomicBoolean();
- private static final AtomicBoolean STARTED = new AtomicBoolean();
-
- static {
- LogConfig.initClass();
- ResettableHandler.registerReset();
- }
-
- private Helidon() {
- }
-
- /**
- * Initialize Helidon Injection service registry. In case the intent is to also start services, such as WebServer,
- * see {@link #start()}.
- *
- * @return service registry
- */
- public static Services serviceRegistry() {
- if (REGISTRY_INITIALIZED.compareAndSet(false, true)) {
- basicInit();
- registryInit(false);
- }
- try {
- READ_LOCK.lock();
- return InjectionServices.realizedServices();
- } finally {
- READ_LOCK.unlock();
- }
- }
-
- /**
- * Initialize Helidon Injection service registry, and start all startable services.
- */
- public static void start() {
- if (STARTED.compareAndSet(false, true)) {
- basicInit();
- registryInit(true);
- } else {
- LOGGER.log(System.Logger.Level.WARNING, "Helidon.start() has already been called.");
- }
- }
-
- private static boolean reset(boolean deep) {
- // for testing purposes
- BASIC_INIT_DONE.set(false);
- REGISTRY_INITIALIZED.set(false);
- STARTED.set(false);
-
- return true;
- }
-
- private static void registryInit(boolean bootServices) {
- try {
- WRITE_LOCK.lock();
-
- boolean explicitConfig = GlobalConfig.configured();
- Config bootstrapConfig = GlobalConfig.config();
-
- Bootstrap bootstrap = Bootstrap.builder()
- .config(bootstrapConfig)
- .build();
-
- InjectionServices.globalBootstrap(bootstrap);
- Services services = InjectionServices.realizedServices();
-
- if (!explicitConfig) {
- GlobalConfig.config(() -> services.lookup(Config.class).get(), true);
- }
-
- if (bootServices) {
- services.lookupAll(Startable.class)
- .stream()
- .map(ServiceProvider::get)
- .forEach(Startable::startService);
- }
- } finally {
- WRITE_LOCK.unlock();
- }
- }
-
- private static void basicInit() {
- if (BASIC_INIT_DONE.compareAndSet(false, true)) {
- LogConfig.configureRuntime();
- }
- }
-
- private static final class ResettableHandler extends InjectionServicesHolder {
- @Deprecated
- private ResettableHandler() {
- }
-
- private static void registerReset() {
- InjectionServicesHolder.addResettable(Helidon::reset);
- }
- }
-}
diff --git a/inject/api/src/main/java/io/helidon/inject/api/InjectionException.java b/inject/api/src/main/java/io/helidon/inject/api/InjectionException.java
deleted file mode 100644
index 7002ce91c59..00000000000
--- a/inject/api/src/main/java/io/helidon/inject/api/InjectionException.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2022, 2024 Oracle and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package io.helidon.inject.api;
-
-/**
- * A general exception indicating that something failed related to Injection.
- *
- * @see InjectionServiceProviderException
- * @see ServiceProviderInjectionException
- * @see InvocationException
- * @deprecated Helidon inject is deprecated and will be replaced in a future version
- */
-@Deprecated(forRemoval = true, since = "4.0.8")
-public class InjectionException extends RuntimeException {
-
- /**
- * A general purpose exception from the Injection Framework.
- *
- * @param msg the message
- */
- public InjectionException(String msg) {
- super(msg);
- }
-
- /**
- * A general purpose exception from the Injection framework.
- *
- * @param msg the message
- * @param cause the root cause
- */
- public InjectionException(String msg,
- Throwable cause) {
- super(msg, cause);
- }
-
-}
diff --git a/inject/api/src/main/java/io/helidon/inject/api/InjectionPointInfoBlueprint.java b/inject/api/src/main/java/io/helidon/inject/api/InjectionPointInfoBlueprint.java
deleted file mode 100644
index 36fcdd48588..00000000000
--- a/inject/api/src/main/java/io/helidon/inject/api/InjectionPointInfoBlueprint.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Copyright (c) 2022, 2024 Oracle and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package io.helidon.inject.api;
-
-import io.helidon.builder.api.Prototype;
-import io.helidon.common.types.TypeName;
-import io.helidon.config.metadata.ConfiguredOption;
-
-/**
- * Describes a receiver for injection - identifies who/what is requesting an injection that needs to be satisfied.
- * @deprecated Helidon inject is deprecated and will be replaced in a future version
- */
-@Deprecated(forRemoval = true, since = "4.0.8")
-@Prototype.Blueprint
-interface InjectionPointInfoBlueprint extends ElementInfo, ElementInfoBlueprint {
- /**
- * Name of the field or argument we are injecting into.
- * Best effort, if cannot be found, an indexed approach may be used (such as {@code arg0}).
- *
- * @return name of the injection point field or argument
- */
- String ipName();
-
- /**
- * Type of the field or argument we are injecting into.
- *
- * @return type of the field or argument, including generic type declarations
- */
- TypeName ipType();
-
- /**
- * The identity (aka id) for this injection point. The id should be unique for the service type it is contained within.
- *
- * This method will return the {@link #baseIdentity()} when {@link #elementOffset()} is null. If not null
- * then the elemOffset is part of the returned identity.
- *
- * @return the unique identity
- */
- String id();
-
- /**
- * The base identifying name for this injection point. If the element represents a function, then the function arguments
- * are encoded in its base identity.
- *
- * @return the base identity of the element
- */
- String baseIdentity();
-
- /**
- * True if the injection point is of type {@link java.util.List}.
- *
- * @return true if list based receiver
- */
- @ConfiguredOption("false")
- boolean listWrapped();
-
- /**
- * True if the injection point is of type {@link java.util.Optional}.
- *
- * @return true if optional based receiver
- */
- @ConfiguredOption("false")
- boolean optionalWrapped();
-
- /**
- * True if the injection point is of type Provider (or Supplier).
- *
- * @return true if provider based receiver
- */
- @ConfiguredOption("false")
- boolean providerWrapped();
-
- /**
- * The service info criteria/dependency this is dependent upon.
- *
- * @return the service info criteria we are dependent upon
- */
- ServiceInfoCriteria dependencyToServiceInfo();
-
-}
diff --git a/inject/api/src/main/java/io/helidon/inject/api/InjectionPointProvider.java b/inject/api/src/main/java/io/helidon/inject/api/InjectionPointProvider.java
deleted file mode 100644
index 701c4634823..00000000000
--- a/inject/api/src/main/java/io/helidon/inject/api/InjectionPointProvider.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright (c) 2022, 2024 Oracle and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package io.helidon.inject.api;
-
-import java.util.List;
-import java.util.Optional;
-
-import jakarta.inject.Provider;
-
-/**
- * Provides ability to contextualize the injected service by the target receiver of the injection point dynamically
- * at runtime. This API will provide service instances of type {@code T}. These services may be singleton, or created based upon
- * scoping cardinality that is defined by the provider implementation of the given type. This is why the javadoc reads "get (or
- * create)".
- *
- * The ordering of services, and the preferred service itself, is determined by the same as documented for
- * {@link Services}.
- *
- * @param the type that the provider produces
- * @deprecated Helidon inject is deprecated and will be replaced in a future version
- */
-@Deprecated(forRemoval = true, since = "4.0.8")
-public interface InjectionPointProvider extends Provider {
-
- /**
- * Get (or create) an instance of this service type using default/empty criteria and context.
- *
- * @return the best service provider matching the criteria
- * @throws InjectionException if resolution fails to resolve a match
- */
- @Override
- default T get() {
- return first(InjectionServices.SERVICE_QUERY_REQUIRED)
- .orElseThrow(this::couldNotFindMatch);
- }
-
- /**
- * Get (or create) an instance of this service type for the given injection point context. This is logically the same
- * as using the first element of the result from calling {@link #list(ContextualServiceQuery)}.
- *
- * @param query the service query
- * @return the best service provider matching the criteria
- * @throws InjectionException if expected=true and resolution fails to resolve a match
- */
- Optional first(ContextualServiceQuery query);
-
- /**
- * Get (or create) a list of instances matching the criteria for the given injection point context.
- *
- * @param query the service query
- * @return the resolved services matching criteria for the injection point in order of weight, or null if the context is not
- * supported
- */
- default List list(ContextualServiceQuery query) {
- return first(query).map(List::of).orElseGet(List::of);
- }
-
- private InjectionException couldNotFindMatch() {
- if (this instanceof ServiceProvider) {
- return new InjectionServiceProviderException("Expected to find a match", (ServiceProvider>) this);
- }
- return new InjectionException("Expected to find a match for " + this);
- }
-
-}
diff --git a/inject/api/src/main/java/io/helidon/inject/api/InjectionServiceProviderException.java b/inject/api/src/main/java/io/helidon/inject/api/InjectionServiceProviderException.java
deleted file mode 100644
index 22662e3df3c..00000000000
--- a/inject/api/src/main/java/io/helidon/inject/api/InjectionServiceProviderException.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * Copyright (c) 2022, 2024 Oracle and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package io.helidon.inject.api;
-
-import java.util.Objects;
-import java.util.Optional;
-
-/**
- * An exception relative to a {@link ServiceProvider}.
- * @deprecated Helidon inject is deprecated and will be replaced in a future version
- */
-@Deprecated(forRemoval = true, since = "4.0.8")
-public class InjectionServiceProviderException extends InjectionException {
-
- /**
- * The service provider this exception pertains.
- */
- private final ServiceProvider> serviceProvider;
-
- /**
- * A general purpose exception from the Injection framework.
- *
- * @param msg the message
- */
- public InjectionServiceProviderException(String msg) {
- super(msg);
- this.serviceProvider = null;
- }
-
- /**
- * A general purpose exception from the Injection framework.
- *
- * @param msg the message
- * @param cause the root cause
- */
- public InjectionServiceProviderException(String msg,
- Throwable cause) {
- super(msg, cause);
-
- if (cause instanceof InjectionServiceProviderException exc) {
- this.serviceProvider = exc.serviceProvider().orElse(null);
- } else {
- this.serviceProvider = null;
- }
- }
-
- /**
- * A general purpose exception from the Injection framework.
- *
- * @param msg the message
- * @param serviceProvider the service provider
- */
- public InjectionServiceProviderException(String msg,
- ServiceProvider> serviceProvider) {
- super(msg);
- Objects.requireNonNull(serviceProvider);
- this.serviceProvider = serviceProvider;
- }
-
- /**
- * A general purpose exception from the Injection framework.
- *
- * @param msg the message
- * @param cause the root cause
- * @param serviceProvider the service provider
- */
- public InjectionServiceProviderException(String msg,
- Throwable cause,
- ServiceProvider> serviceProvider) {
- super(msg, cause);
- Objects.requireNonNull(serviceProvider);
- this.serviceProvider = serviceProvider;
- }
-
- /**
- * The service provider that this exception pertains to, or empty if not related to any particular provider.
- *
- * @return the optional / contextual service provider
- */
- public Optional> serviceProvider() {
- return Optional.ofNullable(serviceProvider);
- }
-
- @Override
- public String getMessage() {
- return super.getMessage()
- + (serviceProvider == null ? "" : (": service provider: " + serviceProvider));
- }
-
-}
diff --git a/inject/api/src/main/java/io/helidon/inject/api/InjectionServices.java b/inject/api/src/main/java/io/helidon/inject/api/InjectionServices.java
deleted file mode 100644
index 959ef009940..00000000000
--- a/inject/api/src/main/java/io/helidon/inject/api/InjectionServices.java
+++ /dev/null
@@ -1,252 +0,0 @@
-/*
- * Copyright (c) 2022, 2024 Oracle and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package io.helidon.inject.api;
-
-import java.util.Map;
-import java.util.Objects;
-import java.util.Optional;
-import java.util.Set;
-
-import io.helidon.common.types.TypeName;
-
-/**
- * Abstract factory for all services provided by a single Helidon Injection provider implementation.
- * An implementation of this interface must minimally supply a "services registry" - see {@link #services()}.
- *
- * The global singleton instance is accessed via {@link #injectionServices()}. Note that optionally one can provide a
- * primordial bootstrap configuration to the {@code Injection} services provider. One must establish any bootstrap instance
- * prior to the first call to {@link #injectionServices()} as it will use a default configuration if not explicitly set. Once
- * the bootstrap has been set it cannot be changed for the lifespan of the JVM.
- * @deprecated Helidon inject is deprecated and will be replaced in a future version
- */
-@Deprecated(forRemoval = true, since = "4.0.8")
-public interface InjectionServices {
- /**
- * Tag for putting Injection tooling, processing, and runtime into debug mode.
- * @see InjectionServices#config()
- * @see InjectionServicesConfig#shouldDebug()
- */
- String TAG_DEBUG = "inject.debug";
-
-
- /**
- * Empty criteria will match anything and everything.
- */
- ServiceInfoCriteria EMPTY_CRITERIA = ServiceInfoCriteria.builder().build();
-
- /**
- * Denotes a match to any (default) service, but required to be matched to at least one.
- */
- ContextualServiceQuery SERVICE_QUERY_REQUIRED = ContextualServiceQuery.builder()
- .serviceInfoCriteria(EMPTY_CRITERIA)
- .expected(true)
- .build();
-
- /**
- * Whether debug is enabled.
- *
- * @return whether to debug
- */
- static boolean isDebugEnabled() {
- return injectionServices()
- .map(InjectionServices::config)
- .map(InjectionServicesConfig::shouldDebug)
- .orElseGet(() -> Boolean.getBoolean(InjectionServices.TAG_DEBUG));
- }
-
- /**
- * Returns the {@link Bootstrap} configuration instance that was used to initialize this instance.
- *
- * @return the bootstrap configuration instance
- */
- Bootstrap bootstrap();
-
- /**
- * Retrieves any primordial bootstrap configuration that previously set.
- *
- * @return the bootstrap primordial configuration already assigned
- * @see #globalBootstrap(Bootstrap)
- */
- static Optional globalBootstrap() {
- return InjectionServicesHolder.bootstrap(false);
- }
-
- /**
- * First attempts to locate and return the {@link #globalBootstrap()} and if not found will create a new bootstrap instance.
- *
- * @return a bootstrap
- */
- static Bootstrap realizedGlobalBootStrap() {
- Optional bootstrap = globalBootstrap();
- return bootstrap.orElseGet(() -> InjectionServicesHolder.bootstrap(true).orElseThrow());
- }
-
- /**
- * Sets the primordial bootstrap configuration that will supply {@link #injectionServices()} during global
- * singleton initialization.
- *
- * @param bootstrap the primordial global bootstrap configuration
- * @see #globalBootstrap()
- */
- static void globalBootstrap(Bootstrap bootstrap) {
- Objects.requireNonNull(bootstrap);
- InjectionServicesHolder.bootstrap(bootstrap);
- }
-
- /**
- * Get {@link InjectionServices} instance if available. The highest {@link io.helidon.common.Weighted} service will be loaded
- * and returned. Remember to optionally configure any primordial {@link Bootstrap} configuration prior to the
- * first call to get {@code InjectionServices}.
- *
- * @return the services instance
- */
- static Optional injectionServices() {
- return InjectionServicesHolder.injectionServices();
- }
-
- /**
- * Short-cut for the following code block. During the first invocation the {@link Services} registry
- * will be initialized.
- *
- *
- *
- * @return the services instance
- */
- static Services realizedServices() {
- return injectionServices().orElseThrow().services();
- }
-
- /**
- * Similar to {@link #services()}, but here if Injection is not available or the services registry has not yet been initialized
- * then this method will return {@code Optional.empty()}. This is convenience for users who conditionally want to use Injection's
- * service registry if it is currently available and in active use, but if not do alternative processing or allocations
- * directly, etc.
- *
- * @return the services instance if it has already been activated and initialized, empty otherwise
- */
- static Optional unrealizedServices() {
- return injectionServices()
- .flatMap(it -> it.services(false));
- }
-
- /**
- * The service registry. The first call typically loads and initializes the service registry. To avoid automatic loading
- * and initialization on any first request then consider using {@link #unrealizedServices()} or {@link #services(boolean)}.
- *
- * @return the services registry
- */
- default Services services() {
- return services(true).orElseThrow();
- }
-
- /**
- * The service registry. The first call typically loads and initializes the service registry.
- *
- * @param initialize true to allow initialization applicable for the 1st request, false to prevent 1st call initialization
- * @return the services registry if it is available and already has been initialized, empty if not yet initialized
- */
- Optional extends Services> services(boolean initialize);
-
- /**
- * The governing configuration.
- *
- * @return the config
- */
- InjectionServicesConfig config();
-
- /**
- * Optionally, the injector.
- *
- * @return the injector, or empty if not available
- */
- Optional injector();
-
- /**
- * Attempts to perform a graceful {@link Injector#deactivate(Object, InjectorOptions)} on all managed
- * service instances in the {@link Services} registry.
- * Deactivation is handled within the current thread.
- *
- * If the service provider does not support shutdown an empty is returned.
- *
- * The default reference implementation will return a map of all service types that were deactivated to any
- * throwable that was observed during that services shutdown sequence.
- *
- * The order in which services are deactivated is dependent upon whether the {@link #activationLog()} is available.
- * If the activation log is available, then services will be shutdown in reverse chronological order as how they
- * were started. If the activation log is not enabled or found to be empty then the deactivation will be in reverse
- * order of {@link RunLevel} from the highest value down to the lowest value. If two services share
- * the same {@link RunLevel} value then the ordering will be based upon the implementation's comparator.
- *
- * When shutdown returns, it is guaranteed that all services were shutdown, or failed to achieve shutdown.
- *
- * The shutdown timeout from {@link InjectionServicesConfigBlueprint#shutdownTimeout()} will be applied as the default.
- *
- * @return a map of all managed service types deactivated to results of deactivation, or empty if shutdown is not supported
- */
- Optional