|
| 1 | +/* |
| 2 | + * Copyright (C) Alibaba Cloud Computing |
| 3 | + * All rights reserved. |
| 4 | + */ |
| 5 | + |
| 6 | +using System; |
| 7 | +using Aliyun.Acs.Dybaseapi.MNS.Model; |
| 8 | +using System.Collections.Generic; |
| 9 | + |
| 10 | +namespace Aliyun.Acs.Dybaseapi.MNS |
| 11 | +{ |
| 12 | + /// <summary> |
| 13 | + /// Interface for accessing MNS queue |
| 14 | + /// </summary> |
| 15 | + public partial interface IQueue |
| 16 | + { |
| 17 | + |
| 18 | + #region DeleteMessage |
| 19 | + |
| 20 | + /// <summary> |
| 21 | + /// Deletes the specified message from the specified queue. |
| 22 | + /// </summary> |
| 23 | + /// <param name="receiptHandle">The receipt handle associated with the message to delete.</param> |
| 24 | + /// |
| 25 | + /// <returns>The response returned by the MNS DeleteMessage service.</returns> |
| 26 | + /// <exception cref="ReceiptHandleErrorException"> |
| 27 | + /// The receipt handle you provide is not valid. |
| 28 | + /// </exception> |
| 29 | + /// <exception cref="QueueNotExistException"> |
| 30 | + /// The queue name you provided is not exist. |
| 31 | + /// </exception> |
| 32 | + /// <exception cref="InvalidArgumentException"> |
| 33 | + /// The value of Element should between Low and High seconds/bytes. |
| 34 | + /// </exception> |
| 35 | + DeleteMessageResponse DeleteMessage(string receiptHandle); |
| 36 | + |
| 37 | + /// <summary> |
| 38 | + /// Deletes the specified message from the specified queue. |
| 39 | + /// </summary> |
| 40 | + /// <param name="request">The request object to be sent to MNS DeleteMessage service.</param> |
| 41 | + /// |
| 42 | + /// <returns>The response returned by the MNS DeleteMessage service.</returns> |
| 43 | + /// <exception cref="ReceiptHandleErrorException"> |
| 44 | + /// The receipt handle you provide is not valid. |
| 45 | + /// </exception> |
| 46 | + /// <exception cref="QueueNotExistException"> |
| 47 | + /// The queue name you provided is not exist. |
| 48 | + /// </exception> |
| 49 | + /// <exception cref="InvalidArgumentException"> |
| 50 | + /// The value of Element should between Low and High seconds/bytes. |
| 51 | + /// </exception> |
| 52 | + DeleteMessageResponse DeleteMessage(DeleteMessageRequest request); |
| 53 | + |
| 54 | + /// <summary> |
| 55 | + /// Deletes the specified message from the specified queue. |
| 56 | + /// </summary> |
| 57 | + /// <param name="request">The request object to be sent to MNS BatchDeleteMessage service.</param> |
| 58 | + /// |
| 59 | + /// <returns>The response returned by the MNS BatchDeleteMessage service.</returns> |
| 60 | + /// <exception cref="ReceiptHandleErrorException"> |
| 61 | + /// The receipt handle you provide is not valid. |
| 62 | + /// </exception> |
| 63 | + /// <exception cref="QueueNotExistException"> |
| 64 | + /// The queue name you provided is not exist. |
| 65 | + /// </exception> |
| 66 | + /// <exception cref="InvalidArgumentException"> |
| 67 | + /// The value of Element should between MIN and MAX seconds/bytes. |
| 68 | + /// </exception> |
| 69 | + /// <exception cref="BatchDeleteFailException"> |
| 70 | + /// Some messages are not deleted. |
| 71 | + /// </exception> |
| 72 | + BatchDeleteMessageResponse BatchDeleteMessage(BatchDeleteMessageRequest request); |
| 73 | + |
| 74 | + /// <summary> |
| 75 | + /// Begins an asynchronous request to MNS DeleteMessage service. |
| 76 | + /// </summary> |
| 77 | + /// |
| 78 | + /// <param name="request">The request object to be sent to MNS DeleteMessage service.</param> |
| 79 | + /// <param name="callback">The AsyncCallback delegate.</param> |
| 80 | + /// <param name="state">The state object for this request.</param> |
| 81 | + /// |
| 82 | + /// <returns>An IAsyncResult that references the asynchronous request for a response.</returns> |
| 83 | + IAsyncResult BeginDeleteMessage(DeleteMessageRequest request, AsyncCallback callback, object state); |
| 84 | + |
| 85 | + /// <summary> |
| 86 | + /// Ends an asynchronous request for MNS DeleteMessage service. |
| 87 | + /// </summary> |
| 88 | + /// |
| 89 | + /// <param name="asyncResult">The IAsyncResult returned by the call to BeginDeleteMessage.</param> |
| 90 | + /// |
| 91 | + /// <returns>The response returned by the MNS DeleteMessage service.</returns> |
| 92 | + DeleteMessageResponse EndDeleteMessage(IAsyncResult asyncResult); |
| 93 | + |
| 94 | + /// <summary> |
| 95 | + /// Begins an asynchronous request to MNS BatchDeleteMessage service. |
| 96 | + /// </summary> |
| 97 | + /// |
| 98 | + /// <param name="request">The request object to be sent to MNS BatchDeleteMessage service.</param> |
| 99 | + /// <param name="callback">The AsyncCallback delegate.</param> |
| 100 | + /// <param name="state">The state object for this request.</param> |
| 101 | + /// |
| 102 | + /// <returns>An IAsyncResult that references the asynchronous request for a response.</returns> |
| 103 | + IAsyncResult BeginBatchDeleteMessage(BatchDeleteMessageRequest request, AsyncCallback callback, object state); |
| 104 | + |
| 105 | + /// <summary> |
| 106 | + /// Ends an asynchronous request for MNS BatchDeleteMessage service. |
| 107 | + /// </summary> |
| 108 | + /// |
| 109 | + /// <param name="asyncResult">The IAsyncResult returned by the call to BeginBatchDeleteMessage.</param> |
| 110 | + /// |
| 111 | + /// <returns>The response returned by the MNS BatchDeleteMessage service.</returns> |
| 112 | + BatchDeleteMessageResponse EndBatchDeleteMessage(IAsyncResult asyncResult); |
| 113 | + |
| 114 | + #endregion |
| 115 | + |
| 116 | + #region ReceiveMessage |
| 117 | + |
| 118 | + /// <summary> |
| 119 | + /// Retrieves one message from this queue. |
| 120 | + /// </summary> |
| 121 | + /// |
| 122 | + /// <returns>The response returned by the MNS ReceiveMessage service.</returns> |
| 123 | + /// |
| 124 | + /// <exception cref="QueueNotExistException"> |
| 125 | + /// The queue name you provided is not exist. |
| 126 | + /// </exception> |
| 127 | + /// <exception cref="MessageNotExistException"> |
| 128 | + /// no messages exist. |
| 129 | + /// </exception> |
| 130 | + ReceiveMessageResponse ReceiveMessage(); |
| 131 | + |
| 132 | + /// <summary> |
| 133 | + /// Retrieves one message. |
| 134 | + /// </summary> |
| 135 | + /// <param name="waitSeconds">Wait polling time for this request.</param> |
| 136 | + /// |
| 137 | + /// <returns>The response returned by the MNS ReceiveMessage service.</returns> |
| 138 | + /// <exception cref="QueueNotExistException"> |
| 139 | + /// The queue name you provided is not exist. |
| 140 | + /// </exception> |
| 141 | + /// <exception cref="MessageNotExistException"> |
| 142 | + /// no messages exist. |
| 143 | + /// </exception> |
| 144 | + ReceiveMessageResponse ReceiveMessage(uint waitSeconds); |
| 145 | + |
| 146 | + /// <summary> |
| 147 | + /// Retrieves one message. |
| 148 | + /// </summary> |
| 149 | + /// <param name="request">The request object to be sent to MNS ReceiveMessage service.</param> |
| 150 | + /// |
| 151 | + /// <returns>The response returned by the MNS ReceiveMessage service.</returns> |
| 152 | + /// <exception cref="QueueNotExistException"> |
| 153 | + /// The queue name you provided is not exist. |
| 154 | + /// </exception> |
| 155 | + /// <exception cref="MessageNotExistException"> |
| 156 | + /// no messages exist. |
| 157 | + /// </exception> |
| 158 | + ReceiveMessageResponse ReceiveMessage(ReceiveMessageRequest request); |
| 159 | + |
| 160 | + /// <summary> |
| 161 | + /// batch retrieves messages. |
| 162 | + /// </summary> |
| 163 | + /// <param name="batchSize">the most count limit of retrieved messages</param> |
| 164 | + /// <param name="waitSeconds">Wait polling time for this request.</param> |
| 165 | + /// |
| 166 | + /// <returns>The response returned by the MNS ReceiveMessage service.</returns> |
| 167 | + /// <exception cref="QueueNotExistException"> |
| 168 | + /// The queue name you provided is not exist. |
| 169 | + /// </exception> |
| 170 | + /// <exception cref="MessageNotExistException"> |
| 171 | + /// no messages exist. |
| 172 | + /// </exception> |
| 173 | + BatchReceiveMessageResponse BatchReceiveMessage(uint batchSize); |
| 174 | + |
| 175 | + /// <summary> |
| 176 | + /// batch retrieves messages. |
| 177 | + /// </summary> |
| 178 | + /// <param name="batchSize">the most count limit of retrieved messages</param> |
| 179 | + /// <param name="waitSeconds">Wait polling time for this request.</param> |
| 180 | + /// |
| 181 | + /// <returns>The response returned by the MNS ReceiveMessage service.</returns> |
| 182 | + /// <exception cref="QueueNotExistException"> |
| 183 | + /// The queue name you provided is not exist. |
| 184 | + /// </exception> |
| 185 | + /// <exception cref="MessageNotExistException"> |
| 186 | + /// no messages exist. |
| 187 | + /// </exception> |
| 188 | + BatchReceiveMessageResponse BatchReceiveMessage(uint batchSize, uint waitSeconds); |
| 189 | + |
| 190 | + /// <summary> |
| 191 | + /// batch retrieves messages. |
| 192 | + /// </summary> |
| 193 | + /// <param name="batchSize">the most count limit of retrieved messages</param> |
| 194 | + /// <param name="waitSeconds">Wait polling time for this request.</param> |
| 195 | + /// |
| 196 | + /// <returns>The response returned by the MNS ReceiveMessage service.</returns> |
| 197 | + /// <exception cref="QueueNotExistException"> |
| 198 | + /// The queue name you provided is not exist. |
| 199 | + /// </exception> |
| 200 | + /// <exception cref="MessageNotExistException"> |
| 201 | + /// no messages exist. |
| 202 | + /// </exception> |
| 203 | + BatchReceiveMessageResponse BatchReceiveMessage(BatchReceiveMessageRequest request); |
| 204 | + |
| 205 | + /// <summary> |
| 206 | + /// Begins an asynchronous request to MNS ReceiveMessage service. |
| 207 | + /// </summary> |
| 208 | + /// |
| 209 | + /// <param name="request">The request object to be sent to MNS ReceiveMessage service.</param> |
| 210 | + /// <param name="callback">The AsyncCallback delegate.</param> |
| 211 | + /// <param name="state">The state object for this request.</param> |
| 212 | + /// |
| 213 | + /// <returns>An IAsyncResult that references the asynchronous request for a response.</returns> |
| 214 | + IAsyncResult BeginReceiveMessage(ReceiveMessageRequest request, AsyncCallback callback, object state); |
| 215 | + |
| 216 | + /// <summary> |
| 217 | + /// Ends an asynchronous request for MNS ReceiveMessage service. |
| 218 | + /// </summary> |
| 219 | + /// |
| 220 | + /// <param name="asyncResult">The IAsyncResult returned by the call to BeginReceiveMessage.</param> |
| 221 | + /// |
| 222 | + /// <returns>The response returned by the MNS ReceiveMessage service.</returns> |
| 223 | + ReceiveMessageResponse EndReceiveMessage(IAsyncResult asyncResult); |
| 224 | + |
| 225 | + /// <summary> |
| 226 | + /// Begins an asynchronous request to MNS BatchReceiveMessage service. |
| 227 | + /// </summary> |
| 228 | + /// |
| 229 | + /// <param name="request">The request object to be sent to MNS BatchReceiveMessage service.</param> |
| 230 | + /// <param name="callback">The AsyncCallback delegate.</param> |
| 231 | + /// <param name="state">The state object for this request.</param> |
| 232 | + /// |
| 233 | + /// <returns>An IAsyncResult that references the asynchronous request for a response.</returns> |
| 234 | + IAsyncResult BeginBatchReceiveMessage(BatchReceiveMessageRequest request, AsyncCallback callback, object state); |
| 235 | + |
| 236 | + /// <summary> |
| 237 | + /// Ends an asynchronous request for MNS BatchReceiveMessage service. |
| 238 | + /// </summary> |
| 239 | + /// |
| 240 | + /// <param name="asyncResult">The IAsyncResult returned by the call to BeginBatchReceiveMessage.</param> |
| 241 | + /// |
| 242 | + /// <returns>The response returned by the MNS BatchReceiveMessage service.</returns> |
| 243 | + BatchReceiveMessageResponse EndBatchReceiveMessage(IAsyncResult asyncResult); |
| 244 | + |
| 245 | + #endregion |
| 246 | + } |
| 247 | +} |
0 commit comments