Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add withProperties to all jms message types #1752

Merged
merged 1 commit into from
Jun 25, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions jms/src/main/scala/akka/stream/alpakka/jms/JmsMessages.scala
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ sealed class JmsByteMessagePassThrough[+PassThrough] protected[jms] (val bytes:
def withProperty(name: String, value: Any): JmsByteMessagePassThrough[PassThrough] =
copy(properties = properties + (name -> value))

def withProperties(props: Map[String, Any]): JmsByteMessagePassThrough[PassThrough] =
copy(properties = properties ++ props)

def toQueue(name: String): JmsByteMessagePassThrough[PassThrough] = to(Queue(name))

def toTopic(name: String): JmsByteMessagePassThrough[PassThrough] = to(Topic(name))
Expand Down Expand Up @@ -198,6 +201,9 @@ sealed class JmsByteStringMessagePassThrough[+PassThrough] protected[jms] (val b
def withProperty(name: String, value: Any): JmsByteStringMessagePassThrough[PassThrough] =
copy(properties = properties + (name -> value))

def withProperties(props: Map[String, Any]): JmsByteStringMessagePassThrough[PassThrough] =
copy(properties = properties ++ props)

def toQueue(name: String): JmsByteStringMessagePassThrough[PassThrough] = to(Queue(name))

def toTopic(name: String): JmsByteStringMessagePassThrough[PassThrough] = to(Topic(name))
Expand Down Expand Up @@ -325,6 +331,9 @@ sealed class JmsMapMessagePassThrough[+PassThrough] protected[jms] (val body: Ma
def withProperty(name: String, value: Any): JmsMapMessagePassThrough[PassThrough] =
copy(properties = properties + (name -> value))

def withProperties(props: Map[String, Any]): JmsMapMessagePassThrough[PassThrough] =
copy(properties = properties ++ props)

def toQueue(name: String): JmsMapMessagePassThrough[PassThrough] = to(Queue(name))

def toTopic(name: String): JmsMapMessagePassThrough[PassThrough] = to(Topic(name))
Expand Down Expand Up @@ -451,6 +460,9 @@ sealed class JmsTextMessagePassThrough[+PassThrough] protected[jms] (val body: S
def withProperty(name: String, value: Any): JmsTextMessagePassThrough[PassThrough] =
copy(properties = properties + (name -> value))

def withProperties(props: Map[String, Any]): JmsTextMessagePassThrough[PassThrough] =
copy(properties = properties ++ props)

def toQueue(name: String): JmsTextMessagePassThrough[PassThrough] = to(Queue(name))

def toTopic(name: String): JmsTextMessagePassThrough[PassThrough] = to(Topic(name))
Expand Down Expand Up @@ -574,6 +586,9 @@ sealed class JmsObjectMessagePassThrough[+PassThrough] protected[jms] (val seria
def withProperty(name: String, value: Any): JmsObjectMessagePassThrough[PassThrough] =
copy(properties = properties + (name -> value))

def withProperties(props: Map[String, Any]): JmsObjectMessagePassThrough[PassThrough] =
copy(properties = properties ++ props)

def toQueue(name: String): JmsObjectMessagePassThrough[PassThrough] = to(Queue(name))

def toTopic(name: String): JmsObjectMessagePassThrough[PassThrough] = to(Topic(name))
Expand Down