com.vaadin.base.devserver.
Class DevModeHandlerManagerImpl
All Implemented Interfaces:
Provides API to access to the DevModeHandler
instance.
For internal use only. May be renamed or removed in a future release.
Since:
Author:
Vaadin Ltd
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns a
DevModeHandler
instance for the givenservice
.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
.static boolean
isDevModeAlreadyStarted
(VaadinContext context) Shows whether
DevModeHandler
has been already started or not.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
.
-
Constructor Details
-
DevModeHandlerManagerImpl
public DevModeHandlerManagerImpl()
-
-
Method Details
-
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
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
Description copied from interface:
DevModeHandlerManager
Returns a
DevModeHandler
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 new
DevModeHandler
.Specified by:
initDevModeHandler
in interfaceDevModeHandlerManager
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
public void stopDevModeHandler()Description copied from interface:
DevModeHandlerManager
Stops a running
DevModeHandler
.Specified by:
stopDevModeHandler
in interfaceDevModeHandlerManager
-
launchBrowserInDevelopmentMode
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 -
setApplicationUrl
Description copied from interface:
DevModeHandlerManager
Sets the application URL for the given application.
This is only called if the URL is known.
Specified by:
setApplicationUrl
in interfaceDevModeHandlerManager
Parameters:
applicationUrl
- the application url -
registerShutdownCommand
Description copied from interface:
DevModeHandlerManager
Registers a command that will run when DevModeHandler is shut down
Specified by:
registerShutdownCommand
in interfaceDevModeHandlerManager
Parameters:
command
- the command to run -
isDevModeAlreadyStarted
Shows whether
DevModeHandler
has been already started or not.Parameters:
context
- TheVaadinContext
, notnull
Returns:
true
ifDevModeHandler
has already been started,false
- otherwise
-