camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r802994 - in /camel/trunk/camel-core/src/main/java/org/apache/camel: Message.java impl/DefaultMessage.java util/CaseInsensitiveMap.java
Date Tue, 11 Aug 2009 05:44:39 GMT
Author: davsclaus
Date: Tue Aug 11 05:44:39 2009
New Revision: 802994

URL: http://svn.apache.org/viewvc?rev=802994&view=rev
Log:
CAMEL-1886: Added javadoc about the headers.

Modified:
    camel/trunk/camel-core/src/main/java/org/apache/camel/Message.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultMessage.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/util/CaseInsensitiveMap.java

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/Message.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/Message.java?rev=802994&r1=802993&r2=802994&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/Message.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/Message.java Tue Aug 11 05:44:39
2009
@@ -25,6 +25,9 @@
  * Implements the <a
  * href="http://camel.apache.org/message.html">Message</a> pattern and
  * represents an inbound or outbound message as part of an {@link Exchange}
+ * <p/>
+ * See {@link org.apache.camel.impl.DefaultMessage DefaultMessage} for how headers is represented
in Camel using a
+ * {@link org.apache.camel.util.CaseInsensitiveMap CaseInsensitiveMap}.
  *
  * @version $Revision$
  */
@@ -32,6 +35,8 @@
 
     /**
      * Returns the id of the message
+     *
+     * @return the message id
      */
     String getMessageId();
 
@@ -44,16 +49,22 @@
 
     /**
      * Returns the exchange this message is related to
+     *
+     * @return the exchange
      */
     Exchange getExchange();
 
     /**
      * Returns true if this message represents a fault
+     *
+     * @return <tt>true</tt> if this is a fault message, <tt>false</tt>
for regular messages.
      */
     boolean isFault();
 
     /**
      * Sets the fault flag on this message
+     *
+     * @param fault the fault flag
      */
     void setFault(boolean fault);
 
@@ -222,12 +233,16 @@
     void setAttachments(Map<String, DataHandler> attachments);
 
     /**
-     * Returns <tt>true</tt> if this message has any attachments.
+     * Returns whether this message has attachments.
+     *
+     * @return <tt>true</tt> if this message has any attachments.
      */
     boolean hasAttachments();
 
     /**
      * Returns the unique ID for a message exchange if this message is capable of creating
one or null if not
+     *
+     * @return the created exchange id, or <tt>null</tt> if not capable of creating
      */
     String createExchangeId();
 }

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultMessage.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultMessage.java?rev=802994&r1=802993&r2=802994&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultMessage.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultMessage.java Tue Aug
11 05:44:39 2009
@@ -28,6 +28,11 @@
 
 /**
  * The default implementation of {@link org.apache.camel.Message}
+ * <p/>
+ * This implementation uses a {@link org.apache.camel.util.CaseInsensitiveMap} storing the
headers.
+ * This allows us to be able to lookup headers using case insensitive keys, making it easier
for end users
+ * as they do not have to be worried about using excact keys.
+ * See more details at {@link org.apache.camel.util.CaseInsensitiveMap}.
  *
  * @version $Revision$
  */

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/util/CaseInsensitiveMap.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/util/CaseInsensitiveMap.java?rev=802994&r1=802993&r2=802994&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/util/CaseInsensitiveMap.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/util/CaseInsensitiveMap.java Tue
Aug 11 05:44:39 2009
@@ -23,6 +23,12 @@
 
 /**
  * A map that uses case insensitive keys, but preserves the original keys in the keySet.
+ * <p/>
+ * This map allows you to do lookup using case insenstive keys so you can retrieve the value
without worring about
+ * whether some transport protocol affects the keys such as Http and Mail protocols can do.
+ * <p/>
+ * When copying from this map to a regular Map such as {@link java.util.HashMap} then the
original keys are
+ * copied over and you get the old behavior back using a regular Map with case sensitive
keys.
  *
  * @version $Revision$
  */



Mime
View raw message