Class SocketEndpointPostProcessor
java.lang.Object
io.fluxzero.sdk.configuration.spring.SocketEndpointPostProcessor
- All Implemented Interfaces:
org.springframework.beans.factory.config.BeanFactoryPostProcessor, org.springframework.beans.factory.support.BeanDefinitionRegistryPostProcessor
public class SocketEndpointPostProcessor
extends Object
implements org.springframework.beans.factory.support.BeanDefinitionRegistryPostProcessor
Spring
BeanDefinitionRegistryPostProcessor that detects beans annotated with SocketEndpoint
and registers them as FluxzeroPrototype definitions for use in Fluxzero.
This enables WebSocket endpoints to be managed by Fluxzero, allowing handler methods within these types to respond
to socket-based requests (e.g. via WebRequest).
Usage
To expose a WebSocket endpoint in your application:@SocketEndpoint
public class ChatSocketEndpoint {
@HandleSocketMessage
public ChatResponse handle(ChatRequest request) {
// respond to request via WebSocket
}
}
Ensure that Spring picks up this processor, typically via:
@SpringBootApplication
@Import(FluxzeroSpringConfig.class)
public class MyApp { ... }
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidpostProcessBeanDefinitionRegistry(@NonNull org.springframework.beans.factory.support.BeanDefinitionRegistry registry) voidpostProcessBeanFactory(@NonNull org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory)
-
Constructor Details
-
SocketEndpointPostProcessor
public SocketEndpointPostProcessor()
-
-
Method Details
-
postProcessBeanFactory
public void postProcessBeanFactory(@NonNull @NonNull org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory) throws org.springframework.beans.BeansException - Specified by:
postProcessBeanFactoryin interfaceorg.springframework.beans.factory.support.BeanDefinitionRegistryPostProcessor- Specified by:
postProcessBeanFactoryin interfaceorg.springframework.beans.factory.config.BeanFactoryPostProcessor- Throws:
org.springframework.beans.BeansException
-
postProcessBeanDefinitionRegistry
public void postProcessBeanDefinitionRegistry(@NonNull @NonNull org.springframework.beans.factory.support.BeanDefinitionRegistry registry) throws org.springframework.beans.BeansException - Specified by:
postProcessBeanDefinitionRegistryin interfaceorg.springframework.beans.factory.support.BeanDefinitionRegistryPostProcessor- Throws:
org.springframework.beans.BeansException
-