@Target(value=TYPE) @Retention(value=RUNTIME) @Documented @Import(value=EventSourceBeanRegistrar.class) @Repeatable(value=EnableEventSources.class) public @interface EnableEventSource
event sources.
A Spring bean with type EventSource is registered at the ApplicationContext. The name of the
beans can be specified by name().
EventSources are created using one of the registered EventSourceBuilder.
The builder() attribute is used to select the EventSourceBuilder instance.
The EventSource.getChannelName() is configured using channelName().
| Modifier and Type | Required Element and Description |
|---|---|
java.lang.String |
channelName
The name of the message channel.
|
| Modifier and Type | Optional Element and Description |
|---|---|
java.lang.String |
builder
The optional name of the
EventSourceBuilder bean used to construct the EventSource instance. |
java.lang.String |
name
The name of the registered EventSource bean.
|
public abstract java.lang.String channelName
Resolving placeholders like "${my.channel.name}" is supported for this property.
public abstract java.lang.String name
If name() is not set, the name of the bean is derived from the name of the message channel.
public abstract java.lang.String builder
EventSourceBuilder bean used to construct the EventSource instance.
By default, the bean named 'defaultEventSourceBuilder' is used.