|
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.Collections.Generic;
|
7 | 6 |
|
8 | 7 | namespace RabbitMQ.AMQP.Client
|
9 | 8 | {
|
10 |
| - public class ConnectionException : Exception |
11 |
| - { |
12 |
| - public ConnectionException(string message) : base(message) |
13 |
| - { |
14 |
| - } |
15 |
| - |
16 |
| - public ConnectionException(string message, Exception innerException) : base(message, innerException) |
17 |
| - { |
18 |
| - } |
19 |
| - } |
20 |
| - |
21 | 9 | public interface IConnection : ILifeCycle
|
22 | 10 | {
|
| 11 | + /// <summary> |
| 12 | + /// The <see cref="IManagement"/> instance for this connection. |
| 13 | + /// </summary> |
| 14 | + /// <returns><see cref="IManagement"/> instance for this connection.</returns> |
23 | 15 | IManagement Management();
|
24 | 16 |
|
| 17 | + /// <summary> |
| 18 | + /// Create an <see cref="IPublisherBuilder"/> instance for this connection. |
| 19 | + /// </summary> |
| 20 | + /// <returns><see cref="IPublisherBuilder"/> instance for this connection.</returns> |
25 | 21 | IPublisherBuilder PublisherBuilder();
|
26 | 22 |
|
| 23 | + /// <summary> |
| 24 | + /// Create an <see cref="IConsumerBuilder"/> instance for this connection. |
| 25 | + /// </summary> |
| 26 | + /// <returns><see cref="IConsumerBuilder"/> instance for this connection.</returns> |
27 | 27 | IConsumerBuilder ConsumerBuilder();
|
28 | 28 |
|
| 29 | + /// <summary> |
| 30 | + /// Create an <see cref="IRpcServerBuilder"/> instance for this connection. |
| 31 | + /// </summary> |
| 32 | + /// <returns><see cref="IRpcServerBuilder"/> instance for this connection.</returns> |
29 | 33 | IRpcServerBuilder RpcServerBuilder();
|
30 | 34 |
|
| 35 | + /// <summary> |
| 36 | + /// Create an <see cref="IRpcClientBuilder"/> instance for this connection. |
| 37 | + /// </summary> |
| 38 | + /// <returns><see cref="IRpcClientBuilder"/> instance for this connection.</returns> |
31 | 39 | IRpcClientBuilder RpcClientBuilder();
|
32 | 40 |
|
| 41 | + /// <summary> |
| 42 | + /// Get the properties for this connection. |
| 43 | + /// </summary> |
| 44 | + /// <returns><see cref="IReadOnlyDictionary{TKey, TValue}"/> of connection properties.</returns> |
33 | 45 | public IReadOnlyDictionary<string, object> Properties { get; }
|
34 | 46 |
|
| 47 | + /// <summary> |
| 48 | + /// Get the <see cref="IPublisher"/> instances associated with this connection. |
| 49 | + /// </summary> |
| 50 | + /// <returns><see cref="IEnumerable{T}"/> of <see cref="IPublisher"/> instances.</returns> |
35 | 51 | public IEnumerable<IPublisher> Publishers { get; }
|
36 | 52 |
|
| 53 | + /// <summary> |
| 54 | + /// Get the <see cref="IConsumer"/> instances associated with this connection. |
| 55 | + /// </summary> |
| 56 | + /// <returns><see cref="IEnumerable{T}"/> of <see cref="IConsumer"/> instances.</returns> |
37 | 57 | public IEnumerable<IConsumer> Consumers { get; }
|
38 | 58 |
|
| 59 | + /// <summary> |
| 60 | + /// Get or set the Connection ID. Used by <see cref="IEnvironment"/> |
| 61 | + /// </summary> |
39 | 62 | public long Id { get; set; }
|
40 | 63 | }
|
41 | 64 | }
|
0 commit comments