public abstract class AbstractEventSource extends java.lang.Object implements EventSource
| Constructor and Description |
|---|
AbstractEventSource(java.lang.String name,
org.springframework.context.ApplicationEventPublisher eventPublisher,
com.fasterxml.jackson.databind.ObjectMapper objectMapper) |
| Modifier and Type | Method and Description |
|---|---|
DispatchingMessageConsumer |
dispatchingMessageConsumer()
Returns the list of registered EventConsumers.
|
java.lang.String |
getName()
An event source's name is used to connect event sources to their consumers.
|
boolean |
isStopping() |
protected void |
publishEvent(ChannelPosition channelPosition,
EventSourceNotification.Status status) |
protected void |
publishEvent(ChannelPosition channelPosition,
EventSourceNotification.Status status,
java.lang.String message) |
void |
register(MessageConsumer<?> messageConsumer)
Registers a new EventConsumer at the EventSource.
|
void |
stop() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitconsumeAll, consumeAll, consumeAll, consumeAll, getStreamNamepublic AbstractEventSource(java.lang.String name,
org.springframework.context.ApplicationEventPublisher eventPublisher,
com.fasterxml.jackson.databind.ObjectMapper objectMapper)
public java.lang.String getName()
EventSourcegetName in interface EventSourcepublic void stop()
stop in interface EventSourcepublic boolean isStopping()
isStopping in interface EventSourcepublic void register(MessageConsumer<?> messageConsumer)
consumers have to be thread safe as it may be called from multiple threads
(e.g. for kinesis streams there is one thread per shard)
register in interface EventSourcemessageConsumer - the EventConsumer that is registered at the EventSourcepublic DispatchingMessageConsumer dispatchingMessageConsumer()
dispatchingMessageConsumer in interface EventSourceprotected void publishEvent(ChannelPosition channelPosition, EventSourceNotification.Status status)
protected void publishEvent(ChannelPosition channelPosition, EventSourceNotification.Status status, java.lang.String message)