Class SocketEndpointPostProcessor

java.lang.Object
io.fluxzero.sdk.configuration.spring.SocketEndpointPostProcessor

public class SocketEndpointPostProcessor extends Object
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 Details

    • SocketEndpointPostProcessor

      public SocketEndpointPostProcessor()
  • Method Details

    • postProcessBeanFactory

      public void postProcessBeanFactory(@NonNull @NonNull org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory) throws org.springframework.beans.BeansException
      Throws:
      org.springframework.beans.BeansException
    • postProcessBeanDefinitionRegistry

      public void postProcessBeanDefinitionRegistry(@NonNull @NonNull org.springframework.beans.factory.support.BeanDefinitionRegistry registry) throws org.springframework.beans.BeansException
      Throws:
      org.springframework.beans.BeansException