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
|
|
|
|
|
{
|
|
|
|
|
IDependencyResolver DependencyResolver { get; }
|
|
|
|
|
IReadOnlyList<IMessageMiddleware> MessageMiddleware { get; }
|
|
|
|
|
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; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public interface IBinding
|
|
|
|
|
{
|
|
|
|
|
Type Controller { get; }
|
|
|
|
|
MethodInfo Method { get; }
|
|
|
|
|
Type MessageClass { get; }
|
2017-01-31 11:01:08 +00:00
|
|
|
|
string QueueName { get; }
|
|
|
|
|
|
|
|
|
|
IReadOnlyList<IMessageMiddleware> MessageMiddleware { get; }
|
2017-02-05 22:22:34 +00:00
|
|
|
|
IReadOnlyList<IBindingFilter> BindingFilters { get; }
|
2016-12-11 14:08:58 +00:00
|
|
|
|
|
2017-02-05 22:22:34 +00:00
|
|
|
|
Task<bool> Accept(IMessageContext context, object message);
|
|
|
|
|
Task Invoke(IMessageContext context, object message);
|
2016-12-11 14:08:58 +00:00
|
|
|
|
}
|
2017-01-31 11:01:08 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public interface IDynamicQueueBinding : IBinding
|
|
|
|
|
{
|
|
|
|
|
void SetQueueName(string queueName);
|
|
|
|
|
}
|
2016-12-11 14:08:58 +00:00
|
|
|
|
}
|