|
2 | 2 | // and the Mozilla Public License, version 2.0.
|
3 | 3 | // Copyright (c) 2017-2024 Broadcom. All Rights Reserved. The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
|
4 | 4 |
|
5 |
| -using System; |
6 | 5 | using System.Threading;
|
7 | 6 | using System.Threading.Tasks;
|
8 | 7 |
|
9 | 8 | namespace RabbitMQ.AMQP.Client
|
10 | 9 | {
|
11 |
| - public class ModelException : Exception |
12 |
| - { |
13 |
| - public ModelException(string message) : base(message) |
14 |
| - { |
15 |
| - } |
16 |
| - } |
17 |
| - |
18 |
| - public class PreconditionFailedException : Exception |
19 |
| - { |
20 |
| - public PreconditionFailedException(string message) : base(message) |
21 |
| - { |
22 |
| - } |
23 |
| - } |
24 |
| - |
25 |
| - public class BadRequestException : Exception |
26 |
| - { |
27 |
| - public BadRequestException(string message) : base(message) |
28 |
| - { |
29 |
| - } |
30 |
| - } |
31 |
| - |
32 | 10 | /// <summary>
|
33 |
| - /// IManagement interface and is responsible for managing the AMQP resources. |
34 |
| - /// RabbitMQ uses AMQP end point: "/management" to manage the resources like queues, exchanges, and bindings. |
35 |
| - /// The management endpoint works like an HTTP RPC endpoint where the client sends a request to the server. |
| 11 | + /// The <see cref="IManagement"/> interface is used to manage the |
| 12 | + /// <see href="https://www.rabbitmq.com/tutorials/amqp-concepts">AMQP 0.9.1 model</see> |
| 13 | + /// topology (exchanges, queues, and bindings). |
36 | 14 | /// </summary>
|
37 | 15 | public interface IManagement : ILifeCycle
|
38 | 16 | {
|
| 17 | + /// <summary> |
| 18 | + /// Create an <see cref="IQueueSpecification"/>, with an auto-generated name. |
| 19 | + /// </summary> |
| 20 | + /// <returns>A builder for <see cref="IQueueSpecification"/></returns> |
39 | 21 | IQueueSpecification Queue();
|
| 22 | + |
| 23 | + /// <summary> |
| 24 | + /// Create an <see cref="IQueueSpecification"/>, with the given name. |
| 25 | + /// </summary> |
| 26 | + /// <returns>A builder for <see cref="IQueueSpecification"/></returns> |
40 | 27 | IQueueSpecification Queue(string name);
|
41 | 28 |
|
| 29 | + /// <summary> |
| 30 | + /// Get the <see cref="IQueueInfo"/> for the given queue specification. |
| 31 | + /// </summary> |
| 32 | + /// <param name="queueSpec">The <see cref="IQueueSpecification"/></param> |
| 33 | + /// <param name="cancellationToken">The <see cref="CancellationToken"/></param> |
| 34 | + /// <returns>The <see cref="IQueueInfo"/> for the given spec.</returns> |
42 | 35 | Task<IQueueInfo> GetQueueInfoAsync(IQueueSpecification queueSpec,
|
43 | 36 | CancellationToken cancellationToken = default);
|
| 37 | + |
| 38 | + /// <summary> |
| 39 | + /// Get the <see cref="IQueueInfo"/> for the given queue name. |
| 40 | + /// </summary> |
| 41 | + /// <param name="queueName">The queue name</param> |
| 42 | + /// <param name="cancellationToken">The <see cref="CancellationToken"/></param> |
| 43 | + /// <returns>The <see cref="IQueueInfo"/> for the given spec.</returns> |
44 | 44 | Task<IQueueInfo> GetQueueInfoAsync(string queueName,
|
45 | 45 | CancellationToken cancellationToken = default);
|
46 | 46 |
|
| 47 | + /// <summary> |
| 48 | + /// Create an <see cref="IExchangeSpecification"/>, with an auto-generated name. |
| 49 | + /// </summary> |
| 50 | + /// <returns>A builder for <see cref="IExchangeSpecification"/></returns> |
47 | 51 | IExchangeSpecification Exchange();
|
| 52 | + |
| 53 | + /// <summary> |
| 54 | + /// Create an <see cref="IExchangeSpecification"/>, with the given name. |
| 55 | + /// </summary> |
| 56 | + /// <returns>A builder for <see cref="IExchangeSpecification"/></returns> |
48 | 57 | IExchangeSpecification Exchange(string name);
|
49 | 58 |
|
| 59 | + /// <summary> |
| 60 | + /// Create an <see cref="IBindingSpecification"/>. |
| 61 | + /// </summary> |
| 62 | + /// <returns>A builder for <see cref="IBindingSpecification"/></returns> |
50 | 63 | IBindingSpecification Binding();
|
51 | 64 | }
|
52 | 65 |
|
|
0 commit comments