You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by mi...@apache.org on 2021/02/11 12:20:25 UTC
[activemq-nms-api] branch master updated: AMQNET-637 NMS 2.0 Add
missing async message factory methods overloads to producers
This is an automated email from the ASF dual-hosted git repository.
michaelpearce pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/activemq-nms-api.git
The following commit(s) were added to refs/heads/master by this push:
new ab50d6d AMQNET-637 NMS 2.0 Add missing async message factory methods overloads to producers
new 432293f Merge pull request #25 from lukeabsent/AMQNET-637
ab50d6d is described below
commit ab50d6dec89303b33c14f57fb06499dad9be076d
Author: lukeabsent <tr...@interia.pl>
AuthorDate: Thu Feb 11 13:09:59 2021 +0100
AMQNET-637 NMS 2.0 Add missing async message factory methods overloads to producers
---
src/nms-api/IMessageProducer.cs | 40 +++++++++++++++++++++++++++++++++++++
src/nms-api/INMSProducer.cs | 44 +++++++++++++++++++++++++++++++++++++++--
2 files changed, 82 insertions(+), 2 deletions(-)
diff --git a/src/nms-api/IMessageProducer.cs b/src/nms-api/IMessageProducer.cs
index 38f3b05..682fbcc 100644
--- a/src/nms-api/IMessageProducer.cs
+++ b/src/nms-api/IMessageProducer.cs
@@ -118,40 +118,80 @@ namespace Apache.NMS
IMessage CreateMessage();
/// <summary>
+ /// Creates a new message with an empty body
+ /// </summary>
+ Task<IMessage> CreateMessageAsync();
+
+ /// <summary>
/// Creates a new text message with an empty body
/// </summary>
ITextMessage CreateTextMessage();
/// <summary>
+ /// Creates a new text message with an empty body
+ /// </summary>
+ Task<ITextMessage> CreateTextMessageAsync();
+
+ /// <summary>
/// Creates a new text message with the given body
/// </summary>
ITextMessage CreateTextMessage(string text);
/// <summary>
+ /// Creates a new text message with the given body
+ /// </summary>
+ Task<ITextMessage> CreateTextMessageAsync(string text);
+
+ /// <summary>
/// Creates a new Map message which contains primitive key and value pairs
/// </summary>
IMapMessage CreateMapMessage();
/// <summary>
+ /// Creates a new Map message which contains primitive key and value pairs
+ /// </summary>
+ Task<IMapMessage> CreateMapMessageAsync();
+
+ /// <summary>
/// Creates a new Object message containing the given .NET object as the body
/// </summary>
IObjectMessage CreateObjectMessage(object body);
/// <summary>
+ /// Creates a new Object message containing the given .NET object as the body
+ /// </summary>
+ Task<IObjectMessage> CreateObjectMessageAsync(object body);
+
+ /// <summary>
/// Creates a new binary message
/// </summary>
IBytesMessage CreateBytesMessage();
/// <summary>
+ /// Creates a new binary message
+ /// </summary>
+ Task<IBytesMessage> CreateBytesMessageAsync();
+
+ /// <summary>
/// Creates a new binary message with the given body
/// </summary>
IBytesMessage CreateBytesMessage(byte[] body);
/// <summary>
+ /// Creates a new binary message with the given body
+ /// </summary>
+ Task<IBytesMessage> CreateBytesMessageAsync(byte[] body);
+
+ /// <summary>
/// Creates a new stream message
/// </summary>
IStreamMessage CreateStreamMessage();
+ /// <summary>
+ /// Creates a new stream message
+ /// </summary>
+ Task<IStreamMessage> CreateStreamMessageAsync();
+
#endregion
}
}
\ No newline at end of file
diff --git a/src/nms-api/INMSProducer.cs b/src/nms-api/INMSProducer.cs
index 038bdb4..1adfe8e 100644
--- a/src/nms-api/INMSProducer.cs
+++ b/src/nms-api/INMSProducer.cs
@@ -141,48 +141,88 @@ namespace Apache.NMS
INMSProducer SetProperty(string name, IDictionary value);
- #region Factory methods to create messages
-
+ #region Factory methods to create messages
+
/// <summary>
/// Creates a new message with an empty body
/// </summary>
IMessage CreateMessage();
/// <summary>
+ /// Creates a new message with an empty body
+ /// </summary>
+ Task<IMessage> CreateMessageAsync();
+
+ /// <summary>
/// Creates a new text message with an empty body
/// </summary>
ITextMessage CreateTextMessage();
/// <summary>
+ /// Creates a new text message with an empty body
+ /// </summary>
+ Task<ITextMessage> CreateTextMessageAsync();
+
+ /// <summary>
/// Creates a new text message with the given body
/// </summary>
ITextMessage CreateTextMessage(string text);
/// <summary>
+ /// Creates a new text message with the given body
+ /// </summary>
+ Task<ITextMessage> CreateTextMessageAsync(string text);
+
+ /// <summary>
/// Creates a new Map message which contains primitive key and value pairs
/// </summary>
IMapMessage CreateMapMessage();
/// <summary>
+ /// Creates a new Map message which contains primitive key and value pairs
+ /// </summary>
+ Task<IMapMessage> CreateMapMessageAsync();
+
+ /// <summary>
/// Creates a new Object message containing the given .NET object as the body
/// </summary>
IObjectMessage CreateObjectMessage(object body);
/// <summary>
+ /// Creates a new Object message containing the given .NET object as the body
+ /// </summary>
+ Task<IObjectMessage> CreateObjectMessageAsync(object body);
+
+ /// <summary>
/// Creates a new binary message
/// </summary>
IBytesMessage CreateBytesMessage();
/// <summary>
+ /// Creates a new binary message
+ /// </summary>
+ Task<IBytesMessage> CreateBytesMessageAsync();
+
+ /// <summary>
/// Creates a new binary message with the given body
/// </summary>
IBytesMessage CreateBytesMessage(byte[] body);
/// <summary>
+ /// Creates a new binary message with the given body
+ /// </summary>
+ Task<IBytesMessage> CreateBytesMessageAsync(byte[] body);
+
+ /// <summary>
/// Creates a new stream message
/// </summary>
IStreamMessage CreateStreamMessage();
+ /// <summary>
+ /// Creates a new stream message
+ /// </summary>
+ Task<IStreamMessage> CreateStreamMessageAsync();
+
#endregion
/// <summary>