Package dev.hilla

Class EndpointControllerConfiguration


  • @Configuration
    public class EndpointControllerConfiguration
    extends Object
    A configuration class for customizing the EndpointController class.
    • Constructor Detail

      • EndpointControllerConfiguration

        public EndpointControllerConfiguration​(EndpointProperties endpointProperties)
        Initializes the endpoint configuration.
        Parameters:
        endpointProperties - Vaadin ednpoint properties
    • Method Detail

      • endpointNameChecker

        @Bean
        public EndpointNameChecker endpointNameChecker()
        Registers an endpoint name checker responsible for validating the endpoint names.
        Returns:
        the endpoint name checker
      • accessChecker

        @Bean
        public EndpointAccessChecker accessChecker​(com.vaadin.flow.server.auth.AccessAnnotationChecker accessAnnotationChecker)
        Registers a default EndpointAccessChecker bean instance.
        Parameters:
        accessAnnotationChecker - the access controlks checker to use
        Returns:
        the default Vaadin endpoint access checker bean
      • accessAnnotationChecker

        @Bean
        @ConditionalOnMissingBean
        public com.vaadin.flow.server.auth.AccessAnnotationChecker accessAnnotationChecker()
        Registers a default AccessAnnotationChecker bean instance.
        Returns:
        the default bean
      • csrfChecker

        @Bean
        public CsrfChecker csrfChecker​(javax.servlet.ServletContext servletContext)
        Registers a default CsrfChecker bean instance.
        Parameters:
        servletContext - the servlet context
        Returns:
        the default bean
      • endpointUtil

        @Bean
        public EndpointUtil endpointUtil()
        Registers endpoint utility methods.
        Returns:
        the endpoint util class
      • endpointRegistry

        @Bean
        public EndpointRegistry endpointRegistry​(EndpointNameChecker endpointNameChecker)
        Registers the endpoint registry.
        Parameters:
        endpointNameChecker - the name checker to use
        Returns:
        the endpoint registry
      • endpointInvoker

        @Bean
        public EndpointInvoker endpointInvoker​(org.springframework.context.ApplicationContext applicationContext,
                                               @Autowired(required=false) @Qualifier("vaadinEndpointMapper")
                                               com.fasterxml.jackson.databind.ObjectMapper vaadinEndpointMapper,
                                               ExplicitNullableTypeChecker explicitNullableTypeChecker,
                                               javax.servlet.ServletContext servletContext,
                                               EndpointRegistry endpointRegistry)
        Registers the endpoint invoker.
        Parameters:
        applicationContext - Spring context to extract beans annotated with Endpoint from
        vaadinEndpointMapper - optional bean to override the default ObjectMapper that is used for serializing and deserializing request and response bodies Use EndpointController.VAADIN_ENDPOINT_MAPPER_BEAN_QUALIFIER qualifier to override the mapper.
        explicitNullableTypeChecker - the method parameter and return value type checker to verify that null values are explicit
        servletContext - the servlet context
        endpointRegistry - the registry used to store endpoint information
        Returns:
        the endpoint invoker