Package com.vaadin.base.devserver
Class DevModeHandlerManagerImpl
java.lang.Object
com.vaadin.base.devserver.DevModeHandlerManagerImpl
- All Implemented Interfaces:
DevModeHandlerManager
Provides API to access to the
DevModeHandler instance.
For internal use only. May be renamed or removed in a future release.
- Author:
- Vaadin Ltd
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns aDevModeHandlerinstance for the givenservice.Class<?>[]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.static booleanisDevModeAlreadyStarted(VaadinContext context) Shows whetherDevModeHandlerhas been already started or not.voidOpens the given application URL in a browser if the application is running in development mode.voidregisterShutdownCommand(Command command) Registers a command that will run when DevModeHandler is shut downvoidsetApplicationUrl(String applicationUrl) Sets the application URL for the given application.voidsetDevModeHandler(DevModeHandler devModeHandler) Defines the handler to use with this manager.voidStops a runningDevModeHandler.
-
Constructor Details
-
DevModeHandlerManagerImpl
public DevModeHandlerManagerImpl()
-
-
Method Details
-
getHandlesTypes
Description copied from interface:DevModeHandlerManagerThe annotations the dev mode handler is interested in having scanned from the class path.- Specified by:
getHandlesTypesin interfaceDevModeHandlerManager- Returns:
- an array of types the dev mode handler is interested in
-
setDevModeHandler
Description copied from interface:DevModeHandlerManagerDefines the handler to use with this manager.- Specified by:
setDevModeHandlerin interfaceDevModeHandlerManager- Parameters:
devModeHandler- the dev mode handler to use
-
getDevModeHandler
Description copied from interface:DevModeHandlerManagerReturns aDevModeHandlerinstance for the givenservice.- Specified by:
getDevModeHandlerin interfaceDevModeHandlerManager- Returns:
- a
DevModeHandlerinstance
-
initDevModeHandler
public void initDevModeHandler(Set<Class<?>> classes, VaadinContext context) throws VaadinInitializerException Description copied from interface:DevModeHandlerManagerStarts up a newDevModeHandler.- Specified by:
initDevModeHandlerin interfaceDevModeHandlerManager- Parameters:
classes- classes to check for npm- and js modulescontext- Vaadin Context we are running in- Throws:
VaadinInitializerException- if dev mode can't be initialized
-
stopDevModeHandler
public void stopDevModeHandler()Description copied from interface:DevModeHandlerManagerStops a runningDevModeHandler.- Specified by:
stopDevModeHandlerin interfaceDevModeHandlerManager
-
launchBrowserInDevelopmentMode
Description copied from interface:DevModeHandlerManagerOpens the given application URL in a browser if the application is running in development mode.- Specified by:
launchBrowserInDevelopmentModein interfaceDevModeHandlerManager- Parameters:
url- the url to open
-
setApplicationUrl
Description copied from interface:DevModeHandlerManagerSets the application URL for the given application.This is only called if the URL is known.
- Specified by:
setApplicationUrlin interfaceDevModeHandlerManager- Parameters:
applicationUrl- the application url
-
registerShutdownCommand
Description copied from interface:DevModeHandlerManagerRegisters a command that will run when DevModeHandler is shut down- Specified by:
registerShutdownCommandin interfaceDevModeHandlerManager- Parameters:
command- the command to run
-
isDevModeAlreadyStarted
Shows whetherDevModeHandlerhas been already started or not.- Parameters:
context- TheVaadinContext, notnull- Returns:
trueifDevModeHandlerhas already been started,false- otherwise
-