
ru.vyukov.stomp.StompSubscribeEndpointRegistrar Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of stomp-client-spring-boot-starter Show documentation
Show all versions of stomp-client-spring-boot-starter Show documentation
Stomp client for Spting Boot applications. @Subscribe annotation
The newest version!
package ru.vyukov.stomp;
import org.springframework.beans.factory.InitializingBean;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.List;
/**
* Store @Subscribe methods for further registration in @Bean {@link SubscribeEndpointRegistry}
*
* @author Oleg Vyukov
*/
class StompSubscribeEndpointRegistrar implements InitializingBean {
private SubscribeEndpointRegistry registry;
private List methodInstances = new ArrayList<>();
@Override
public void afterPropertiesSet() {
registry.addAll(methodInstances);
}
public void setRegistry(SubscribeEndpointRegistry registry) {
this.registry = registry;
}
public void register( Method method, Class> targetClass, Object bean) {
SubscribeMethodInstance subscribeMethodInstance = new SubscribeMethodInstance( method, bean);
methodInstances.add(subscribeMethodInstance);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy