Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IManagement XML docs #102

Merged
merged 1 commit into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 38 additions & 25 deletions RabbitMQ.AMQP.Client/IManagement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,51 +2,64 @@
// and the Mozilla Public License, version 2.0.
// Copyright (c) 2017-2024 Broadcom. All Rights Reserved. The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.

using System;
using System.Threading;
using System.Threading.Tasks;

namespace RabbitMQ.AMQP.Client
{
public class ModelException : Exception
{
public ModelException(string message) : base(message)
{
}
}

public class PreconditionFailedException : Exception
{
public PreconditionFailedException(string message) : base(message)
{
}
}

public class BadRequestException : Exception
{
public BadRequestException(string message) : base(message)
{
}
}

/// <summary>
/// IManagement interface and is responsible for managing the AMQP resources.
/// RabbitMQ uses AMQP end point: "/management" to manage the resources like queues, exchanges, and bindings.
/// The management endpoint works like an HTTP RPC endpoint where the client sends a request to the server.
/// The <see cref="IManagement"/> interface is used to manage the
/// <see href="https://www.rabbitmq.com/tutorials/amqp-concepts">AMQP 0.9.1 model</see>
/// topology (exchanges, queues, and bindings).
/// </summary>
public interface IManagement : ILifeCycle
{
/// <summary>
/// Create an <see cref="IQueueSpecification"/>, with an auto-generated name.
/// </summary>
/// <returns>A builder for <see cref="IQueueSpecification"/></returns>
IQueueSpecification Queue();

/// <summary>
/// Create an <see cref="IQueueSpecification"/>, with the given name.
/// </summary>
/// <returns>A builder for <see cref="IQueueSpecification"/></returns>
IQueueSpecification Queue(string name);

/// <summary>
/// Get the <see cref="IQueueInfo"/> for the given queue specification.
/// </summary>
/// <param name="queueSpec">The <see cref="IQueueSpecification"/></param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/></param>
/// <returns>The <see cref="IQueueInfo"/> for the given spec.</returns>
Task<IQueueInfo> GetQueueInfoAsync(IQueueSpecification queueSpec,
CancellationToken cancellationToken = default);

/// <summary>
/// Get the <see cref="IQueueInfo"/> for the given queue name.
/// </summary>
/// <param name="queueName">The queue name</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/></param>
/// <returns>The <see cref="IQueueInfo"/> for the given spec.</returns>
Task<IQueueInfo> GetQueueInfoAsync(string queueName,
CancellationToken cancellationToken = default);

/// <summary>
/// Create an <see cref="IExchangeSpecification"/>, with an auto-generated name.
/// </summary>
/// <returns>A builder for <see cref="IExchangeSpecification"/></returns>
IExchangeSpecification Exchange();

/// <summary>
/// Create an <see cref="IExchangeSpecification"/>, with the given name.
/// </summary>
/// <returns>A builder for <see cref="IExchangeSpecification"/></returns>
IExchangeSpecification Exchange(string name);

/// <summary>
/// Create an <see cref="IBindingSpecification"/>.
/// </summary>
/// <returns>A builder for <see cref="IBindingSpecification"/></returns>
IBindingSpecification Binding();
}

Expand Down
Loading
Loading