You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ta...@apache.org on 2021/06/11 21:29:53 UTC

[qpid-protonj2] 02/02: PROTON-2393 Allow more AmqpValue payloads to be configured for send

This is an automated email from the ASF dual-hosted git repository.

tabish pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/qpid-protonj2.git

commit 19995640302359fc30db15ec673848b552a88846
Author: Timothy Bish <ta...@gmail.com>
AuthorDate: Fri Jun 11 17:29:34 2021 -0400

    PROTON-2393 Allow more AmqpValue payloads to be configured for send
    
    Allows more options for AmqpValue type payloads in scripted transfers
    besides the single String variation that was present.
---
 .../test/driver/actions/TransferInjectAction.java         | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/protonj2-test-driver/src/main/java/org/apache/qpid/protonj2/test/driver/actions/TransferInjectAction.java b/protonj2-test-driver/src/main/java/org/apache/qpid/protonj2/test/driver/actions/TransferInjectAction.java
index 644975c..bd699d5 100644
--- a/protonj2-test-driver/src/main/java/org/apache/qpid/protonj2/test/driver/actions/TransferInjectAction.java
+++ b/protonj2-test-driver/src/main/java/org/apache/qpid/protonj2/test/driver/actions/TransferInjectAction.java
@@ -479,6 +479,21 @@ public class TransferInjectAction extends AbstractPerformativeInjectAction<Trans
             return this;
         }
 
+        public BodySectionBuilder withValue(String body) {
+            TransferInjectAction.this.body = new AmqpValue(body);
+            return this;
+        }
+
+        public BodySectionBuilder withValue(byte[] body) {
+            TransferInjectAction.this.body = new AmqpValue(new Binary(body));
+            return this;
+        }
+
+        public BodySectionBuilder withValue(Binary body) {
+            TransferInjectAction.this.body = new Data(body);
+            return this;
+        }
+
         public BodySectionBuilder withData(byte[] body) {
             TransferInjectAction.this.body = new Data(new Binary(body));
             return this;

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org