public UntypedFilterChannel(UntypedChannel output, SelectiveConsumer <TOutput> filter) { _output = output; _filter = filter; }
/// <summary> /// Constructs a channel /// </summary> /// <param name="fiber">The queue where consumer actions should be enqueued</param> /// <param name="selectiveConsumer">The method to call when a message is sent to the channel</param> public SelectiveConsumerChannel(Fiber fiber, SelectiveConsumer <T> selectiveConsumer) { _fiber = fiber; _selectiveConsumer = selectiveConsumer; }
/// <summary> /// Calls the specified method when a message of the requested type is received. The /// consumer is asked if the message should be parsed, and returns a non-null action /// if the message should be passed to the consumer. At that point, the message is removed /// from the mailbox and delivered to the consumer /// </summary> /// <typeparam name = "T">The requested message type</typeparam> /// <param name="inbox">The inbox to receive the message from</param> /// <param name = "consumer">The consumer</param> /// <param name = "timeout">The time period to wait for a message</param> /// <param name = "timeoutCallback">The method to call if a message is not received within the timeout period</param> public static PendingReceive Receive <T>(this Inbox inbox, SelectiveConsumer <T> consumer, int timeout, Action timeoutCallback) { return(inbox.Receive(consumer, timeout.Milliseconds(), timeoutCallback)); }
public PendingReceive Receive <T>(SelectiveConsumer <T> consumer, TimeSpan timeout, Action timeoutCallback) { return(_inbox.Receive(consumer, timeout, timeoutCallback)); }
public RemoveActivation SelectiveReceive <T>(SelectiveConsumer <T> consumer) { return(_consumerFactory.Create(consumer, this)); }
public PendingReceiveImpl(Inbox inbox, SelectiveConsumer <TMessage> selectiveConsumer, Action <PendingReceiveImpl <TMessage> > onComplete) : this(inbox, selectiveConsumer, NoTimeoutCallback, onComplete) { }
public PendingReceive Receive <T>(SelectiveConsumer <T> consumer) { return(_inbox.Receive(consumer)); }
public static RemoveActivation SelectiveReceive <T>(this RoutingEngineConfigurator configurator, SelectiveConsumer <T> consumer) { return(_consumerFactory.Create(consumer, configurator)); }
public SelectiveConsumerConfigurator(SelectiveConsumer <TChannel> consumer) { _consumer = consumer; }
public PendingReceiveImpl(SelectiveConsumer <T> selectiveConsumer, Action <PendingReceiveImpl <T> > onComplete) : this(selectiveConsumer, NoTimeoutCallback, onComplete) { }
public SelectiveConsumerNode(RoutingEngine engine, SelectiveConsumer <T> selectiveConsumer, bool disableOnActivation = true) : base(engine, disableOnActivation) { _selectiveConsumer = selectiveConsumer; }
public PendingReceive Receive <T>(SelectiveConsumer <T> consumer, int timeout, Action timeoutCallback) { return(GetInbox <T>().Receive(consumer, timeout, timeoutCallback)); }
public PendingReceive Receive <T>(SelectiveConsumer <T> consumer) { return(GetInbox <T>().Receive(consumer)); }
public PendingReceive Receive <T>(SelectiveConsumer <T> consumer) { return(_inbox.Receive(CreateFilteredConsumer(consumer))); }