namespace Luna.Channels.Abstractions;
///
/// Manages the lifecycle and routing of all registered communication channels.
///
public interface IChannelManager
{
///
/// Registers a channel with this manager.
///
///
/// Thrown if a channel with the same ID is already registered.
void RegisterChannel(IChannel channel);
///
/// Unregisters a channel by its ID. No-op if the channel is not found.
///
/// The ID of the channel to remove.
void UnregisterChannel(string channelId);
///
/// Retrieves a registered channel by its ID.
///
/// The ID of the channel to retrieve.
/// The channel, or null if not found.
IChannel? GetChannel(string channelId);
///
/// Returns all currently registered channels.
///
IReadOnlyList GetAllChannels();
///
/// Raised after a message has been received and routed.
///
event EventHandler? MessageRouted;
}