You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ha...@apache.org on 2009/08/02 16:56:06 UTC
svn commit: r800091 -
/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/Exchange.java
Author: hadrian
Date: Sun Aug 2 14:56:06 2009
New Revision: 800091
URL: http://svn.apache.org/viewvc?rev=800091&view=rev
Log:
CAMEL-1822. Added @deprecated flag for apis removed in 2.0
Modified:
camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/Exchange.java
Modified: camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/Exchange.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/Exchange.java?rev=800091&r1=800090&r2=800091&view=diff
==============================================================================
--- camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/Exchange.java (original)
+++ camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/Exchange.java Sun Aug 2 14:56:06 2009
@@ -18,6 +18,7 @@
import java.util.Map;
+import org.apache.camel.spi.HeaderFilterStrategy;
import org.apache.camel.spi.UnitOfWork;
/**
@@ -70,8 +71,7 @@
* @param name the name of the property
* @param type the type of the property
* @return the value of the given header or null if there is no property for
- * the given name or null if it cannot be converted to the given
- * type
+ * the given name or null if it cannot be converted to the given type
*/
<T> T getProperty(String name, Class<T> type);
@@ -114,9 +114,13 @@
/**
* Returns the outbound message, lazily creating one if one has not already
- * been associated with this exchange. If you want to inspect this property
- * but not force lazy creation then invoke the {@link #getOut(boolean)}
- * method passing in <tt>false</tt>
+ * been associated with this exchange. If you want to check if this exchange
+ * has an out, but not force lazy creation, invoke {@link #hasOut()} first
+ * Starting with Camel 2.0.0 an out message could also represent a fault,
+ * i.e. a persistent error at the application level (equivalent to faults
+ * defines in some specifications like wsdl and jbi). You should use
+ * {@link #org.apache.camel.Message}} fault apis to get/set the fault
+ * flag for the out message.
*
* @return the response
*/
@@ -126,6 +130,7 @@
* Returns the outbound message; optionally lazily creating one if one has
* not been associated with this exchange
*
+ * @deprecated Starting with Camel 2.0.0 you should only use {@link #getOut()}
* @param lazyCreate <tt>true</tt> will lazy create the out message
* @return the response
*/
@@ -141,6 +146,8 @@
/**
* Returns the fault message
*
+ * @deprecated Starting with Camel 2.0.0 you should use {@link #getOut()}
+ * and check the {@link #org.apache.camel.Message.isFault()} flag
* @return the fault
*/
Message getFault();
@@ -149,6 +156,8 @@
* Returns the fault message; optionally lazily creating one if one has
* not been associated with this exchange
*
+ * @deprecated Starting with Camel 2.0.0 you should use {@link #getOut()}
+ * and check the {@link #org.apache.camel.Message.isFault()} flag
* @param lazyCreate <tt>true</tt> will lazy create the fault message
* @return the fault
*/
@@ -173,7 +182,7 @@
*
* @return true if this exchange failed due to either an exception or fault
* @see Exchange#getException()
- * @see Exchange#getFault()
+ * @see Exchange#getOut()
*/
boolean isFailed();
@@ -191,6 +200,10 @@
/**
* Creates a new exchange instance with empty messages, headers and properties
+ *
+ * @deprecated Starting with Camel 2.0.0 you should use {@link #copy()}
+ * to get a new instance of an exchange or simply create a new
+ * exchange object
*/
Exchange newInstance();
@@ -203,6 +216,9 @@
/**
* Copies the data into this exchange from the given exchange
*
+ * @deprecated Starting with Camel 2.0.0 you should use {@link #copy()}
+ * to get a new instance of an exchange or simply create a new
+ * exchange object
* @param source is the source from which headers and messages will be copied
*/
void copyFrom(Exchange source);
@@ -228,5 +244,4 @@
* Set the exchange id
*/
void setExchangeId(String id);
-
}