Package com.vaadin.base.devserver
Class DevModeHandlerManagerImpl
- java.lang.Object
-
- com.vaadin.base.devserver.DevModeHandlerManagerImpl
-
- All Implemented Interfaces:
DevModeHandlerManager
public class DevModeHandlerManagerImpl extends Object implements DevModeHandlerManager
Provides API to access to theDevModeHandler
instance.For internal use only. May be renamed or removed in a future release.
- Since:
- Author:
- Vaadin Ltd
-
-
Constructor Summary
Constructors Constructor Description DevModeHandlerManagerImpl()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description DevModeHandler
getDevModeHandler()
Returns aDevModeHandler
instance for the givenservice
.Class<?>[]
getHandlesTypes()
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 newDevModeHandler
.static boolean
isDevModeAlreadyStarted(VaadinContext context)
Shows whetherDevModeHandler
has been already started or not.void
launchBrowserInDevelopmentMode(String url)
Opens the given application URL in a browser if the application is running in development mode.void
setDevModeHandler(DevModeHandler devModeHandler)
Defines the handler to use with this manager.void
stopDevModeHandler()
Stops a runningDevModeHandler
.
-
-
-
Method Detail
-
getHandlesTypes
public Class<?>[] getHandlesTypes()
Description copied from interface:DevModeHandlerManager
The annotations the dev mode handler is interested in having scanned from the class path.- Specified by:
getHandlesTypes
in interfaceDevModeHandlerManager
- Returns:
- an array of types the dev mode handler is interested in
-
setDevModeHandler
public void setDevModeHandler(DevModeHandler devModeHandler)
Description copied from interface:DevModeHandlerManager
Defines the handler to use with this manager.- Specified by:
setDevModeHandler
in interfaceDevModeHandlerManager
- Parameters:
devModeHandler
- the dev mode handler to use
-
getDevModeHandler
public DevModeHandler getDevModeHandler()
Description copied from interface:DevModeHandlerManager
Returns aDevModeHandler
instance for the givenservice
.- Specified by:
getDevModeHandler
in interfaceDevModeHandlerManager
- Returns:
- a
DevModeHandler
instance
-
initDevModeHandler
public void initDevModeHandler(Set<Class<?>> classes, VaadinContext context) throws VaadinInitializerException
Description copied from interface:DevModeHandlerManager
Starts up a newDevModeHandler
.- Specified by:
initDevModeHandler
in interfaceDevModeHandlerManager
- 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
public void stopDevModeHandler()
Description copied from interface:DevModeHandlerManager
Stops a runningDevModeHandler
.- Specified by:
stopDevModeHandler
in interfaceDevModeHandlerManager
-
launchBrowserInDevelopmentMode
public void launchBrowserInDevelopmentMode(String url)
Description copied from interface:DevModeHandlerManager
Opens the given application URL in a browser if the application is running in development mode.- Specified by:
launchBrowserInDevelopmentMode
in interfaceDevModeHandlerManager
- Parameters:
url
- the url to open
-
isDevModeAlreadyStarted
public static boolean isDevModeAlreadyStarted(VaadinContext context)
Shows whetherDevModeHandler
has been already started or not.- Parameters:
context
- TheVaadinContext
, notnull
- Returns:
true
ifDevModeHandler
has already been started,false
- otherwise
-
-