You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by or...@apache.org on 2023/02/27 11:54:13 UTC
[camel] 03/04: CAMEL-15105: documented Exchange API changes on the API documentation and migration guide
This is an automated email from the ASF dual-hosted git repository.
orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 7129c3e7140edb5d1aa019abb2cf5c5b8c30c903
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Mon Feb 27 11:04:51 2023 +0100
CAMEL-15105: documented Exchange API changes on the API documentation and migration guide
---
.../src/main/java/org/apache/camel/Exchange.java | 21 +++++++--------------
.../modules/ROOT/pages/camel-4-migration-guide.adoc | 3 ++-
2 files changed, 9 insertions(+), 15 deletions(-)
diff --git a/core/camel-api/src/main/java/org/apache/camel/Exchange.java b/core/camel-api/src/main/java/org/apache/camel/Exchange.java
index cbbd6afa137..12e4610f206 100644
--- a/core/camel-api/src/main/java/org/apache/camel/Exchange.java
+++ b/core/camel-api/src/main/java/org/apache/camel/Exchange.java
@@ -265,20 +265,7 @@ public interface Exchange {
String XSLT_FATAL_ERROR = "CamelXsltFatalError";
String XSLT_WARNING = "CamelXsltWarning";
- /**
- * Adapts this {@link org.apache.camel.Exchange} to the specialized type.
- * <p/>
- * For example to adapt to <tt>ExtendedExchange</tt>.
- *
- * This method is deprecated. Use the getter to {@link ExchangeExtension}.
- *
- * @param type the type to adapt to
- * @return this {@link org.apache.camel.Exchange} adapted to the given type
- */
- @Deprecated
- <T extends Exchange> T adapt(Class<T> type);
-
- /**
+ /**
* Returns the {@link ExchangePattern} (MEP) of this exchange.
*
* @return the message exchange pattern of this exchange
@@ -672,6 +659,12 @@ public interface Exchange {
*/
long getCreated();
+ /**
+ * Gets the {@link ExchangeExtension} that contains the extension points for internal exchange APIs. These APIs
+ * are intended for internal usage within Camel and end-users should avoid using them.
+ *
+ * @return the {@link ExchangeExtension} point for this exchange.
+ */
ExchangeExtension getExchangeExtension();
}
diff --git a/docs/user-manual/modules/ROOT/pages/camel-4-migration-guide.adoc b/docs/user-manual/modules/ROOT/pages/camel-4-migration-guide.adoc
index a958989dd31..fef6c0057cd 100644
--- a/docs/user-manual/modules/ROOT/pages/camel-4-migration-guide.adoc
+++ b/docs/user-manual/modules/ROOT/pages/camel-4-migration-guide.adoc
@@ -74,7 +74,8 @@ We have removed deprecated APIs such as the following:
- Removed `org.apache.camel.spi.OnCamelContextStop`. Use `org.apache.camel.spi.OnCamelContextStopping` instead.
- Decoupled the `org.apache.camel.ExtendedCamelContext` from the `org.apache.camel.CamelContext`.
-- Replaced `adapt()` from `org.apache.camel.CamelContext` with `getCamelContextExtension`
-
+- Decoupled the `org.apache.camel.ExtendedExchange` from the `org.apache.camel.Exchange`.
+-- Replaced `adapt()` from `org.apache.camel.ExtendedExchange` with `getExchangeExtension`
== EIP Changes