public class ConsumerBeanAutoConfiguration
extends java.lang.Object
implements org.springframework.context.ApplicationListener<org.springframework.context.event.ContextRefreshedEvent>, org.springframework.context.ApplicationContextAware
ApplicationListener implementation that finds beans registered in the current
ApplicationContext that look like a Consumer
bean and interrogates it for event handling methods.| Modifier and Type | Class and Description |
|---|---|
protected static class |
ConsumerBeanAutoConfiguration.Invoker |
protected static class |
ConsumerBeanAutoConfiguration.ReplyToServiceConsumer |
protected static class |
ConsumerBeanAutoConfiguration.ServiceConsumer |
| Modifier and Type | Field and Description |
|---|---|
static org.springframework.util.ReflectionUtils.MethodFilter |
CONSUMER_METHOD_FILTER |
static java.lang.String |
REACTOR_CONVERSION_SERVICE_BEAN_NAME |
| Constructor and Description |
|---|
ConsumerBeanAutoConfiguration() |
| Modifier and Type | Method and Description |
|---|---|
protected reactor.core.Observable |
fetchObservable(Selector selectorAnno,
java.lang.Object bean) |
protected reactor.event.selector.Selector |
fetchSelector(Selector selectorAnno,
java.lang.Object bean,
java.lang.reflect.Method method) |
static java.util.Set<java.lang.reflect.Method> |
findHandlerMethods(java.lang.Class<?> handlerType,
org.springframework.util.ReflectionUtils.MethodFilter handlerMethodFilter) |
void |
onApplicationEvent(org.springframework.context.event.ContextRefreshedEvent ev) |
protected java.lang.Object |
parseReplyTo(ReplyTo selector,
java.lang.Object bean) |
protected java.lang.Object |
parseSelector(Selector selector,
java.lang.Object bean,
java.lang.reflect.Method method) |
void |
setApplicationContext(org.springframework.context.ApplicationContext appCtx) |
void |
wireBean(java.lang.Object bean,
java.util.Set<java.lang.reflect.Method> methods) |
public static final java.lang.String REACTOR_CONVERSION_SERVICE_BEAN_NAME
public static final org.springframework.util.ReflectionUtils.MethodFilter CONSUMER_METHOD_FILTER
public void setApplicationContext(org.springframework.context.ApplicationContext appCtx)
throws org.springframework.beans.BeansException
setApplicationContext in interface org.springframework.context.ApplicationContextAwareorg.springframework.beans.BeansExceptionpublic void onApplicationEvent(org.springframework.context.event.ContextRefreshedEvent ev)
onApplicationEvent in interface org.springframework.context.ApplicationListener<org.springframework.context.event.ContextRefreshedEvent>public void wireBean(java.lang.Object bean,
java.util.Set<java.lang.reflect.Method> methods)
protected reactor.core.Observable fetchObservable(Selector selectorAnno, java.lang.Object bean)
protected java.lang.Object parseSelector(Selector selector, java.lang.Object bean, java.lang.reflect.Method method)
protected java.lang.Object parseReplyTo(ReplyTo selector, java.lang.Object bean)
protected reactor.event.selector.Selector fetchSelector(Selector selectorAnno, java.lang.Object bean, java.lang.reflect.Method method)
public static java.util.Set<java.lang.reflect.Method> findHandlerMethods(java.lang.Class<?> handlerType,
org.springframework.util.ReflectionUtils.MethodFilter handlerMethodFilter)