public EventDrivenConsumer(ISubscribableChannel inputChannel, IMessageHandler handler)
 {
     AssertUtils.ArgumentNotNull(inputChannel, "inputChannel must not be null");
     AssertUtils.ArgumentNotNull(handler, "handler must not be null");
     _inputChannel = inputChannel;
     _handler      = handler;
 }
 public EventDrivenConsumerEndpoint(IApplicationContext context, ISubscribableChannel inputChannel, IMessageHandler handler)
     : base(context)
 {
     _handler      = handler ?? throw new ArgumentNullException(nameof(handler));
     _inputChannel = inputChannel ?? throw new ArgumentNullException(nameof(inputChannel));
     Phase         = int.MaxValue;
 }
 public EventDrivenConsumer(ISubscribableChannel inputChannel, IMessageHandler handler)
 {
     AssertUtils.ArgumentNotNull(inputChannel, "inputChannel must not be null");
     AssertUtils.ArgumentNotNull(handler, "handler must not be null");
     _inputChannel = inputChannel;
     _handler = handler;
 }
Пример #4
0
 public EventDrivenConsumerEndpoint(IServiceProvider serviceProvider, ISubscribableChannel inputChannel, IMessageHandler handler)
     : base(serviceProvider)
 {
     _handler      = handler ?? throw new ArgumentNullException(nameof(handler));
     _inputChannel = inputChannel ?? throw new ArgumentNullException(nameof(inputChannel));
     Phase         = int.MaxValue;
 }
        private bool IsSubscribable(ISubscribableChannel errorChannel)
        {
            if (errorChannel is PublishSubscribeChannel)
            {
                return(true);
            }

            return(errorChannel is Integration.Channel.AbstractSubscribableChannel ? ((Integration.Channel.AbstractSubscribableChannel)errorChannel).SubscriberCount == 0 : true);
        }
 public ErrorInfrastructure(ISubscribableChannel errorChannel, ErrorMessageSendingRecoverer recoverer, IMessageHandler handler)
 {
     ErrorChannel = errorChannel;
     Recoverer    = recoverer;
     Handler      = handler;
 }
Пример #7
0
 public SpringIntegrationConsumerDestination(string name, ISubscribableChannel channel)
 {
     Name    = name;
     Channel = channel;
 }
        public virtual void ReplaceInputChannel(string originalChannelName, string newChannelName, ISubscribableChannel messageChannel)
        {
            _boundInputTargets.Remove(originalChannelName);
            var creator = new Lazy <object>(messageChannel);

            _boundInputTargets.Add(newChannelName, creator);
        }
 private static bool IsSubscribable(ISubscribableChannel errorChannel)
 => errorChannel is PublishSubscribeChannel ||
 errorChannel is not Integration.Channel.AbstractSubscribableChannel ||