camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lburgazz...@apache.org
Subject camel git commit: CAMEL-10724: Improve Java DSL support for Java 8
Date Fri, 17 Feb 2017 08:49:38 GMT
Repository: camel
Updated Branches:
  refs/heads/master fc39180dc -> 4c83320d8


CAMEL-10724: Improve Java DSL support for Java 8


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/4c83320d
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/4c83320d
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/4c83320d

Branch: refs/heads/master
Commit: 4c83320d8c21f0fefaf4e3f0c272d90afecea00a
Parents: fc39180
Author: lburgazzoli <lburgazzoli@gmail.com>
Authored: Fri Feb 17 09:47:48 2017 +0100
Committer: lburgazzoli <lburgazzoli@gmail.com>
Committed: Fri Feb 17 09:48:14 2017 +0100

----------------------------------------------------------------------
 .../src/main/scala/org/apache/camel/scala/RichMessage.scala     | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/4c83320d/components/camel-scala/src/main/scala/org/apache/camel/scala/RichMessage.scala
----------------------------------------------------------------------
diff --git a/components/camel-scala/src/main/scala/org/apache/camel/scala/RichMessage.scala
b/components/camel-scala/src/main/scala/org/apache/camel/scala/RichMessage.scala
index 3c5c896..050f52e 100644
--- a/components/camel-scala/src/main/scala/org/apache/camel/scala/RichMessage.scala
+++ b/components/camel-scala/src/main/scala/org/apache/camel/scala/RichMessage.scala
@@ -20,6 +20,7 @@ import org.apache.camel.Attachment
 import org.apache.camel.Message
 import javax.activation.DataHandler
 import java.util
+import java.util.function.Supplier
 
 class RichMessage(val message: Message) extends Message {
 
@@ -61,8 +62,12 @@ class RichMessage(val message: Message) extends Message {
 
   def getHeader(name: String, defaultValue: Any) = message.getHeader(name, defaultValue)
 
+  def getHeader(name: String, defaultValueSupplier: Supplier[Object]) = message.getHeader(name,
defaultValueSupplier)
+
   def getHeader[T](name: String, defaultValue: Any, headerType: Class[T]) = message.getHeader(name,
defaultValue, headerType)
 
+  def getHeader[T](name: String, defaultValueSupplier: Supplier[Object], headerType: Class[T])
= message.getHeader(name, defaultValueSupplier, headerType)
+
   def getHeader[T](name: String, headerType: Class[T]) = message.getHeader(name, headerType)
 
   def getHeaders = message.getHeaders


Mime
View raw message