Class ServiceInitEvent

    • Constructor Detail

      • ServiceInitEvent

        public ServiceInitEvent​(VaadinService service)
        Creates a new service init event for a given VaadinService and the RequestHandler that will be used by the service.
        Parameters:
        service - the Vaadin service of this request
    • Method Detail

      • addRequestHandler

        public void addRequestHandler​(RequestHandler requestHandler)
        Adds a new request handler that will be used by this service. The added handler will be run before any of the framework's own request handlers, but the ordering relative to other custom handlers is not guaranteed.
        Parameters:
        requestHandler - the request handler to add, not null
      • addIndexHtmlRequestListener

        public void addIndexHtmlRequestListener​(IndexHtmlRequestListener indexHtmlRequestListener)
        Adds a new Index HTML request listener that will be used by this service. The ordering of multiple added bootstrap listeners is not guaranteed.
        Parameters:
        indexHtmlRequestListener - the Index HTML request listener to be added.
      • addDependencyFilter

        public void addDependencyFilter​(DependencyFilter dependencyFilter)
        Adds a new dependency filter that will be used by this service.
        Parameters:
        dependencyFilter - the dependency filter to add, not null
      • getAddedRequestHandlers

        public Stream<RequestHandler> getAddedRequestHandlers()
        Gets a stream of all custom request handlers that have been added for the service.
        Returns:
        the stream of added request handlers
      • getAddedBootstrapListeners

        @Deprecated
        public Stream<BootstrapListener> getAddedBootstrapListeners()
        Deprecated.
        Since 3.0, this API is deprecated in favor of getAddedIndexHtmlRequestListeners() when using client-side bootstrapping
        Gets a stream of all bootstrap listeners that have been added for the service.
        Returns:
        the stream of added bootstrap listeners
      • getAddedIndexHtmlRequestListeners

        public Stream<IndexHtmlRequestListener> getAddedIndexHtmlRequestListeners()
        Gets a stream of all Index HTML request listeners that have been added for the service.
        Returns:
        the stream of added Index HTML request listeners
      • getAddedDependencyFilters

        public Stream<DependencyFilter> getAddedDependencyFilters()
        Gets a stream of all dependency filters that have been added for the service.
        Returns:
        the stream of added dependency filters