public class InMemoryEventSource extends AbstractEventSource
| Constructor and Description |
|---|
InMemoryEventSource(java.lang.String name,
InMemoryChannel inMemoryChannel,
org.springframework.context.ApplicationEventPublisher eventPublisher) |
| Modifier and Type | Method and Description |
|---|---|
ChannelPosition |
consume(ChannelPosition startFrom,
java.util.function.Predicate<Message<?>> stopCondition)
Consumes all events from the EventSource, beginning with
startFrom, until
the stopCondition is met. |
getChannelName, getMessageDispatcher, getName, isStopping, publishEvent, publishEvent, register, stopclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitconsume, consume, consumepublic InMemoryEventSource(java.lang.String name,
InMemoryChannel inMemoryChannel,
org.springframework.context.ApplicationEventPublisher eventPublisher)
public ChannelPosition consume(ChannelPosition startFrom, java.util.function.Predicate<Message<?>> stopCondition)
EventSourcestartFrom, until
the stopCondition is met.
The registered consumers will be called zero or more times, depending on
the number of events retrieved from the EventSource.
startFrom - the read position returned from earlier executionsstopCondition - the predicate used as a stop condition