Quantcast

camel git commit: CAMEL-10724: Improve Java DSL support for Java 8

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

camel git commit: CAMEL-10724: Improve Java DSL support for Java 8

lburgazzoli-2
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 <[hidden email]>
Authored: Fri Feb 17 09:47:48 2017 +0100
Committer: lburgazzoli <[hidden email]>
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

Loading...