Package org.nuxeo.runtime.test.runner
Class HotDeployer
java.lang.Object
org.nuxeo.runtime.test.runner.HotDeployer
A dynamic component deployer which enable tests to deploy new contributions after the test was started (i.e. from
inside the test method) The deployer is reloading all the components and reinject the test members.
- Author:
- bogdan
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Deploy actions are usually used by features to customize the deployment of the runtime feature (which is using the DeaultDeployAction)protected class
This action has no next action and will deploy the contributions and then reload the component manager -
Field Summary
Modifier and TypeFieldDescriptionstatic final String
protected RuntimeHarness
protected HotDeployer.ActionHandler
static final String
static final String
static final String
protected FeaturesRunner
protected static final String
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddHandler
(HotDeployer.ActionHandler action) Add a custom deploy action that wraps the default action.void
Deploy the given list of contributions.void
reinject()
void
reload()
Reloads the components and preserve the current registry state.boolean
removeHandler
(HotDeployer.ActionHandler handler) Remove the given handler if already registeredvoid
reset()
Restart the components and revert to the initial registry snapshot if any.void
restart()
Restart the components and preserve the current registry state.void
-
Field Details
-
DEPLOY_ACTION
- See Also:
-
UNDEPLOY_ACTION
- See Also:
-
RESTART_ACTION
- See Also:
-
RESET_ACTION
- See Also:
-
RELOAD_ACTION
- See Also:
-
runner
-
harness
-
head
-
-
Constructor Details
-
HotDeployer
-
-
Method Details
-
addHandler
Add a custom deploy action that wraps the default action. You should call next.exec(...) in your action code to call the next action -
removeHandler
Remove the given handler if already registered -
deploy
Deploy the given list of contributions. The format is bundleId[:componentPath]. If no component path is specified then the bundle identified by the bundleId part will be deployed. If a componentPath is givenRuntimeHarness.deployContrib(String,String)
will be used to deploy the contribution.- Throws:
Exception
-
undeploy
- Throws:
Exception
-
restart
Restart the components and preserve the current registry state.- Throws:
Exception
-
reset
Restart the components and revert to the initial registry snapshot if any.- Throws:
Exception
-
reload
Reloads the components and preserve the current registry state. This action performs a standby/resume onComponentManager
.- Throws:
Exception
- Since:
- 10.2
-
reinject
public void reinject()
-