public class ServiceInitEvent extends EventObject
VaadinServiceInitListener when a VaadinService
is being initialized.
This event can also be used to add RequestHandlers that will be used
by the VaadinService for handling all requests.
BootstrapListeners can also be registered, that are used to modify
the initial HTML of the application.
source| Constructor and Description |
|---|
ServiceInitEvent(VaadinService service)
Creates a new service init event for a given
VaadinService and
the RequestHandler that will be used by the service. |
| Modifier and Type | Method and Description |
|---|---|
void |
addBootstrapListener(BootstrapListener bootstrapListener)
Deprecated.
Since 3.0, this API is deprecated in favor of
addIndexHtmlRequestListener(com.vaadin.flow.server.communication.IndexHtmlRequestListener) when
using client-side bootstrapping |
void |
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.
|
Stream<BootstrapListener> |
getAddedBootstrapListeners()
Deprecated.
Since 3.0, this API is deprecated in favor of
getAddedIndexHtmlRequestListeners()
when using client-side bootstrapping |
Stream<DependencyFilter> |
getAddedDependencyFilters()
Gets a stream of all dependency filters that have been added for the
service.
|
Stream<IndexHtmlRequestListener> |
getAddedIndexHtmlRequestListeners()
Gets a stream of all Index HTML request listeners that have been added
for the service.
|
Stream<RequestHandler> |
getAddedRequestHandlers()
Gets a stream of all custom request handlers that have been added for the
service.
|
VaadinService |
getSource() |
toStringpublic ServiceInitEvent(VaadinService service)
VaadinService and
the RequestHandler that will be used by the service.service - the Vaadin service of this requestpublic void addRequestHandler(RequestHandler requestHandler)
requestHandler - the request handler to add, not null@Deprecated public void addBootstrapListener(BootstrapListener bootstrapListener)
addIndexHtmlRequestListener(com.vaadin.flow.server.communication.IndexHtmlRequestListener) when
using client-side bootstrappingbootstrapListener - the bootstrap listener to add, not nullpublic void addIndexHtmlRequestListener(IndexHtmlRequestListener indexHtmlRequestListener)
indexHtmlRequestListener - the Index HTML request listener to be added.public void addDependencyFilter(DependencyFilter dependencyFilter)
dependencyFilter - the dependency filter to add, not nullpublic Stream<RequestHandler> getAddedRequestHandlers()
@Deprecated public Stream<BootstrapListener> getAddedBootstrapListeners()
getAddedIndexHtmlRequestListeners()
when using client-side bootstrappingpublic Stream<IndexHtmlRequestListener> getAddedIndexHtmlRequestListeners()
public Stream<DependencyFilter> getAddedDependencyFilters()
public VaadinService getSource()
getSource in class EventObjectCopyright © 2021. All rights reserved.