public class InMemoryEventSource extends AbstractEventSource
| Constructor and Description |
|---|
InMemoryEventSource(java.lang.String name,
java.lang.String streamName,
InMemoryChannel inMemoryChannel,
org.springframework.context.ApplicationEventPublisher eventPublisher,
com.fasterxml.jackson.databind.ObjectMapper objectMapper) |
| Modifier and Type | Method and Description |
|---|---|
ChannelPosition |
consumeAll(ChannelPosition startFrom,
java.util.function.Predicate<Message<?>> stopCondition)
Consumes all events from the EventSource, beginning with
startFrom, until
the stopCondition is met. |
java.lang.String |
getStreamName()
Returns the name of the EventSource.
|
dispatchingMessageConsumer, getName, isStopping, publishEvent, publishEvent, register, stopclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitconsumeAll, consumeAll, consumeAllpublic InMemoryEventSource(java.lang.String name,
java.lang.String streamName,
InMemoryChannel inMemoryChannel,
org.springframework.context.ApplicationEventPublisher eventPublisher,
com.fasterxml.jackson.databind.ObjectMapper objectMapper)
public java.lang.String getStreamName()
EventSourceFor streaming event-sources, this is the name of the event stream.
public ChannelPosition consumeAll(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