com.vaadin.flow.internal.
Interface DevModeHandlerManager
All Known Implementing Classes:
Provides API to access to the DevModeHandler
instance by a
VaadinService
.
For internal use only. May be renamed or removed in a future release.
Since:
Author:
Vaadin Ltd
-
Method Summary
Modifier and TypeMethodDescriptionReturns a
DevModeHandler
instance for the givenservice
.static Optional<DevModeHandler>
getDevModeHandler
(VaadinContext context) Gets the
DevModeHandler
.static Optional<DevModeHandler>
getDevModeHandler
(VaadinService service) Gets the
DevModeHandler
.Class<?>[]
The annotations the dev mode handler is interested in having scanned from the class path.
void
initDevModeHandler
(Set<Class<?>> classes, VaadinContext context) Starts up a new
DevModeHandler
.void
Opens the given application URL in a browser if the application is running in development mode.
void
registerShutdownCommand
(Command command) Registers a command that will run when DevModeHandler is shut down
void
setApplicationUrl
(String applicationUrl) Sets the application URL for the given application.
void
setDevModeHandler
(DevModeHandler devModeHandler) Defines the handler to use with this manager.
void
Stops a running
DevModeHandler
.
-
Method Details
-
getHandlesTypes
Class<?>[] getHandlesTypes()The annotations the dev mode handler is interested in having scanned from the class path.
Returns:
an array of types the dev mode handler is interested in
-
initDevModeHandler
void initDevModeHandler(Set<Class<?>> classes, VaadinContext context) throws VaadinInitializerException Starts up a new
DevModeHandler
.Parameters:
classes
- classes to check for npm- and js modulescontext
- Vaadin Context we are running inThrows:
VaadinInitializerException
- if dev mode can't be initialized -
stopDevModeHandler
void stopDevModeHandler()Stops a running
DevModeHandler
. -
setDevModeHandler
Defines the handler to use with this manager.
Parameters:
devModeHandler
- the dev mode handler to use -
getDevModeHandler
DevModeHandler getDevModeHandler()Returns a
DevModeHandler
instance for the givenservice
.Returns:
a
DevModeHandler
instance -
launchBrowserInDevelopmentMode
Opens the given application URL in a browser if the application is running in development mode.
Parameters:
url
- the url to open -
setApplicationUrl
Sets the application URL for the given application.
This is only called if the URL is known.
Parameters:
applicationUrl
- the application url -
registerShutdownCommand
Registers a command that will run when DevModeHandler is shut down
Parameters:
command
- the command to run -
getDevModeHandler
Gets the
DevModeHandler
.Parameters:
service
- a Vaadin serviceReturns:
an
Optional
containing aDevModeHandler
instance orEMPTY
if disabled -
getDevModeHandler
Gets the
DevModeHandler
.Parameters:
context
- the Vaadin contextReturns:
an
Optional
containing aDevModeHandler
instance orEMPTY
if disabled
-