Package com.vaadin.flow.internal
Interface DevModeHandlerManager
-
- All Known Implementing Classes:
DevModeHandlerManagerImpl
public interface DevModeHandlerManagerProvides API to access to theDevModeHandlerinstance by aVaadinService.For internal use only. May be renamed or removed in a future release.
- Since:
- Author:
- Vaadin Ltd
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description DevModeHandlergetDevModeHandler()Returns aDevModeHandlerinstance for the givenservice.static Optional<DevModeHandler>getDevModeHandler(VaadinContext context)Gets theDevModeHandler.static Optional<DevModeHandler>getDevModeHandler(VaadinService service)Gets theDevModeHandler.Class<?>[]getHandlesTypes()The annotations the dev mode handler is interested in having scanned from the class path.voidinitDevModeHandler(Set<Class<?>> classes, VaadinContext context)Starts up a newDevModeHandler.voidlaunchBrowserInDevelopmentMode(String url)Opens the given application URL in a browser if the application is running in development mode.voidsetDevModeHandler(DevModeHandler devModeHandler)Defines the handler to use with this manager.voidstopDevModeHandler()Stops a runningDevModeHandler.
-
-
-
Method Detail
-
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 newDevModeHandler.- Parameters:
classes- classes to check for npm- and js modulescontext- servlet context we are running in- Throws:
VaadinInitializerException- if dev mode can't be initialized
-
stopDevModeHandler
void stopDevModeHandler()
Stops a runningDevModeHandler.
-
setDevModeHandler
void setDevModeHandler(DevModeHandler devModeHandler)
Defines the handler to use with this manager.- Parameters:
devModeHandler- the dev mode handler to use
-
getDevModeHandler
DevModeHandler getDevModeHandler()
Returns aDevModeHandlerinstance for the givenservice.- Returns:
- a
DevModeHandlerinstance
-
launchBrowserInDevelopmentMode
void launchBrowserInDevelopmentMode(String url)
Opens the given application URL in a browser if the application is running in development mode.- Parameters:
url- the url to open
-
getDevModeHandler
static Optional<DevModeHandler> getDevModeHandler(VaadinService service)
Gets theDevModeHandler.- Parameters:
service- a Vaadin service- Returns:
- an
Optionalcontaining aDevModeHandlerinstance orEMPTYif disabled
-
getDevModeHandler
static Optional<DevModeHandler> getDevModeHandler(VaadinContext context)
Gets theDevModeHandler.- Parameters:
context- the Vaadin context- Returns:
- an
Optionalcontaining aDevModeHandlerinstance orEMPTYif disabled
-
-