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 2023/06/21 17:14:52 UTC

[qpid-protonj2] branch main updated: PROTON-2739 Add API to transfer inject for addition body section values

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


The following commit(s) were added to refs/heads/main by this push:
     new 22901576 PROTON-2739 Add API to transfer inject for addition body section values
22901576 is described below

commit 2290157687c49d672cb43c65ee1e655e8faca0e4
Author: Timothy Bish <ta...@gmail.com>
AuthorDate: Wed Jun 21 13:14:38 2023 -0400

    PROTON-2739 Add API to transfer inject for addition body section values
    
    Allows for Map or generic object type to be set in the body section
    value types when injecting a transfer
---
 .../protonj2/test/driver/actions/TransferInjectAction.java    | 11 +++++++++++
 1 file changed, 11 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 fa716663..dd2c6d01 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
@@ -23,6 +23,7 @@ import java.io.UncheckedIOException;
 import java.nio.ByteBuffer;
 import java.util.Date;
 import java.util.List;
+import java.util.Map;
 import java.util.UUID;
 
 import org.apache.qpid.protonj2.test.driver.AMQPTestDriver;
@@ -496,6 +497,16 @@ public class TransferInjectAction extends AbstractPerformativeInjectAction<Trans
             return this;
         }
 
+        public BodySectionBuilder withValue(Map<?, ?> body) {
+            TransferInjectAction.this.body = new AmqpValue(body);
+            return this;
+        }
+
+        public BodySectionBuilder withValue(Object body) {
+            TransferInjectAction.this.body = new AmqpValue(body);
+            return this;
+        }
+
         public BodySectionBuilder withValue(byte[] body) {
             TransferInjectAction.this.body = new AmqpValue(new Binary(body));
             return this;


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