2016-12-11 14:08:58 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Reflection;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace Tapeti.Config
|
|
|
|
|
{
|
|
|
|
|
public interface IConfig
|
|
|
|
|
{
|
2019-01-24 21:52:21 +00:00
|
|
|
|
bool UsePublisherConfirms { get; }
|
|
|
|
|
|
2016-12-11 14:08:58 +00:00
|
|
|
|
IDependencyResolver DependencyResolver { get; }
|
|
|
|
|
IReadOnlyList<IMessageMiddleware> MessageMiddleware { get; }
|
2017-10-13 11:07:41 +00:00
|
|
|
|
IReadOnlyList<ICleanupMiddleware> CleanupMiddleware { get; }
|
2017-02-12 20:43:30 +00:00
|
|
|
|
IReadOnlyList<IPublishMiddleware> PublishMiddleware { get; }
|
2016-12-11 14:08:58 +00:00
|
|
|
|
IEnumerable<IQueue> Queues { get; }
|
2017-01-31 11:01:08 +00:00
|
|
|
|
|
|
|
|
|
IBinding GetBinding(Delegate method);
|
2016-12-11 14:08:58 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public interface IQueue
|
|
|
|
|
{
|
|
|
|
|
bool Dynamic { get; }
|
|
|
|
|
string Name { get; }
|
|
|
|
|
|
|
|
|
|
IEnumerable<IBinding> Bindings { get; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2017-02-12 14:18:12 +00:00
|
|
|
|
public interface IDynamicQueue : IQueue
|
|
|
|
|
{
|
2019-02-13 11:00:34 +00:00
|
|
|
|
string GetDeclareQueueName();
|
2017-02-12 14:18:12 +00:00
|
|
|
|
void SetName(string name);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2016-12-11 14:08:58 +00:00
|
|
|
|
public interface IBinding
|
|
|
|
|
{
|
|
|
|
|
Type Controller { get; }
|
|
|
|
|
MethodInfo Method { get; }
|
|
|
|
|
Type MessageClass { get; }
|
2017-01-31 11:01:08 +00:00
|
|
|
|
string QueueName { get; }
|
2017-02-15 21:05:01 +00:00
|
|
|
|
QueueBindingMode QueueBindingMode { get; set; }
|
2017-01-31 11:01:08 +00:00
|
|
|
|
|
2017-02-08 14:52:24 +00:00
|
|
|
|
IReadOnlyList<IMessageFilterMiddleware> MessageFilterMiddleware { get; }
|
2017-01-31 11:01:08 +00:00
|
|
|
|
IReadOnlyList<IMessageMiddleware> MessageMiddleware { get; }
|
2016-12-11 14:08:58 +00:00
|
|
|
|
|
2019-04-24 16:04:30 +00:00
|
|
|
|
bool Accept(Type messageClass);
|
2017-02-08 14:52:24 +00:00
|
|
|
|
bool Accept(IMessageContext context, object message);
|
2017-02-05 22:22:34 +00:00
|
|
|
|
Task Invoke(IMessageContext context, object message);
|
2016-12-11 14:08:58 +00:00
|
|
|
|
}
|
2017-01-31 11:01:08 +00:00
|
|
|
|
|
|
|
|
|
|
2017-07-21 12:14:19 +00:00
|
|
|
|
public interface IBuildBinding : IBinding
|
2017-01-31 11:01:08 +00:00
|
|
|
|
{
|
|
|
|
|
void SetQueueName(string queueName);
|
|
|
|
|
}
|
2016-12-11 14:08:58 +00:00
|
|
|
|
}
|