Package com.vaadin.flow.server
Class ServiceInitEvent
java.lang.Object
java.util.EventObject
com.vaadin.flow.server.ServiceInitEvent
- All Implemented Interfaces:
Serializable
Event fired to
VaadinServiceInitListener
when a VaadinService
is being initialized.
This event can also be used to add RequestHandler
s that will be used
by the VaadinService
for handling all requests.
- Since:
- 1.0
- Author:
- Vaadin Ltd
- See Also:
-
Field Summary
Fields inherited from class java.util.EventObject
source
-
Constructor Summary
ConstructorsConstructorDescriptionServiceInitEvent
(VaadinService service) Creates a new service init event for a givenVaadinService
and theRequestHandler
that will be used by the service. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addDependencyFilter
(DependencyFilter dependencyFilter) Adds a new dependency filter that will be used by this service.void
addIndexHtmlRequestListener
(IndexHtmlRequestListener indexHtmlRequestListener) Adds a new Index HTML request listener that will be used by this service.void
addRequestHandler
(RequestHandler requestHandler) Adds a new request handler that will be used by this service.void
addVaadinRequestInterceptor
(VaadinRequestInterceptor vaadinRequestInterceptor) Adds a new request interceptor that will be used by this service.Gets a stream of all dependency filters that have been added for the service.Gets a stream of all Index HTML request listeners that have been added for the service.Gets a stream of all custom request handlers that have been added for the service.Gets a stream of all Vaadin request interceptors that have been added for the service.Methods inherited from class java.util.EventObject
toString
-
Constructor Details
-
ServiceInitEvent
Creates a new service init event for a givenVaadinService
and theRequestHandler
that will be used by the service.- Parameters:
service
- the Vaadin service of this request
-
-
Method Details
-
addRequestHandler
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, notnull
-
addIndexHtmlRequestListener
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
Adds a new dependency filter that will be used by this service.- Parameters:
dependencyFilter
- the dependency filter to add, notnull
-
addVaadinRequestInterceptor
Adds a new request interceptor that will be used by this service.- Parameters:
vaadinRequestInterceptor
- the request interceptor to add, notnull
-
getAddedRequestHandlers
Gets a stream of all custom request handlers that have been added for the service.- Returns:
- the stream of added request handlers
-
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
Gets a stream of all dependency filters that have been added for the service.- Returns:
- the stream of added dependency filters
-
getAddedVaadinRequestInterceptor
Gets a stream of all Vaadin request interceptors that have been added for the service.- Returns:
- the stream of added request interceptors
-
getSource
- Overrides:
getSource
in classEventObject
-