Package com.vaadin.server
Class ServiceInitEvent
- java.lang.Object
-
- java.util.EventObject
-
- com.vaadin.server.ServiceInitEvent
-
- All Implemented Interfaces:
Serializable
public class ServiceInitEvent extends EventObject
Event fired toVaadinServiceInitListener
when aVaadinService
is being initialized.This event can also be used to add
RequestHandler
s that will be used by theVaadinService
for handling all requests.- Since:
- 8.0
- Author:
- Vaadin Ltd
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class java.util.EventObject
source
-
-
Constructor Summary
Constructors Constructor Description ServiceInitEvent(VaadinService service)
Creates a new service init event for a givenVaadinService
and theRequestHandler
that will be used by the service.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addConnectorIdGenerator(ConnectorIdGenerator connectorIdGenerator)
Adds as connector id generator to be used by this service.void
addDependencyFilter(DependencyFilter dependencyFilter)
Adds a new dependency filter that will be used by this service.void
addRequestHandler(RequestHandler requestHandler)
Adds a new request handler that will be used by this service.List<ConnectorIdGenerator>
getAddedConnectorIdGenerators()
Gets an unmodifiable list of all connector id generators that have been added for the service.List<DependencyFilter>
getAddedDependencyFilters()
Gets an unmodifiable list of all dependency filters that have been added for the service.List<RequestHandler>
getAddedRequestHandlers()
Gets an unmodifiable list of all custom request handlers that have been added for the service.VaadinService
getSource()
-
Methods inherited from class java.util.EventObject
toString
-
-
-
-
Constructor Detail
-
ServiceInitEvent
public ServiceInitEvent(VaadinService service)
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 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, notnull
-
getAddedRequestHandlers
public List<RequestHandler> getAddedRequestHandlers()
Gets an unmodifiable list of all custom request handlers that have been added for the service.- Returns:
- the current list of added request handlers
-
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, notnull
- Since:
- 8.1
-
getAddedDependencyFilters
public List<DependencyFilter> getAddedDependencyFilters()
Gets an unmodifiable list of all dependency filters that have been added for the service.- Returns:
- the current list of added dependency filters.
- Since:
- 8.1
-
addConnectorIdGenerator
public void addConnectorIdGenerator(ConnectorIdGenerator connectorIdGenerator)
Adds as connector id generator to be used by this service. By default, the service will fail to deploy if more than one connector id generator has been registered.- Parameters:
connectorIdGenerator
- the connector id generator to add, notnull
- Since:
- 8.1
-
getAddedConnectorIdGenerators
public List<ConnectorIdGenerator> getAddedConnectorIdGenerators()
Gets an unmodifiable list of all connector id generators that have been added for the service.- Returns:
- the current list of added connector id generators
- Since:
- 8.1
-
getSource
public VaadinService getSource()
- Overrides:
getSource
in classEventObject
-
-