Package org.nuxeo.runtime.reload
Interface ReloadService
-
- All Superinterfaces:
TimestampedService
- All Known Implementing Classes:
ReloadComponent
public interface ReloadService extends TimestampedService
Service tracking reload related events or commands when installing a package.WARNING: This interface is used by reflection in org.nuxeo.runtime.tomcat.dev.ReloadServiceInvoker.
- Author:
- Bogdan Stefanescu
-
-
Field Summary
Fields Modifier and Type Field Description static String
AFTER_RELOAD_EVENT_ID
static String
BEFORE_RELOAD_EVENT_ID
static String
FLUSH_EVENT_ID
static String
FLUSH_SEAM_EVENT_ID
static String
RELOAD_EVENT_ID
static String
RELOAD_SEAM_EVENT_ID
static String
RELOAD_TOPIC
static String
USE_COMPAT_HOT_RELOAD
This property allows to use the former way to hot reload Nuxeo server.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description default void
deployBundle(File file)
Deprecated.since 9.3 usereloadBundles(ReloadContext)
instead.default void
deployBundle(File file, boolean reloadResources)
Deprecated.since 9.3 usereloadBundles(ReloadContext)
instead.default void
deployBundles(List<File> files)
Deprecated.since 9.3 usereloadBundles(ReloadContext)
instead.void
deployBundles(List<File> files, boolean reloadResources)
Deprecated.since 9.3 usereloadBundles(ReloadContext)
instead.void
flush()
Sends a runtime event with idFLUSH_EVENT_ID
so that listeners can be notified that a flush is needed (after a reload for instance).void
flushJaasCache()
Sends an event that can trigger reset of JaasCache.void
flushSeamComponents()
Sends a runtime event with idFLUSH_SEAM_EVENT_ID
.String
getOSGIBundleName(File file)
Returns the OSGI bundle name if given file can be identified as an OSGI bundle, or null.void
installWebResources(File file)
Deprecated.since 5.6: userunDeploymentPreprocessor()
method instead, now re-deploys all jars so that the nuxeo.war holds the same content than it would at startup.Long
lastFlushed()
Returns the last time one of the flush commands where called on this service instance (flush()
orflushJaasCache()
orflushSeamComponents()
, or null if never called.void
reload()
Sends a runtime event with idRELOAD_EVENT_ID
so that listeners can be notified that a reload has been done.ReloadResult
reloadBundles(ReloadContext context)
Called by ReloadServiceInvoker#hotReloadBundles.void
reloadProperties()
Reloads runtime framework propertiesvoid
reloadSeamComponents()
Sends a runtime event with idRELOAD_SEAM_EVENT_ID
void
runDeploymentPreprocessor()
Runs the deployment preprocessor.default void
undeployBundle(String bundleName)
Deprecated.since 9.3 usereloadBundles(ReloadContext)
instead.default void
undeployBundle(String bundleName, boolean reloadResources)
Deprecated.since 9.3 usereloadBundles(ReloadContext)
instead.default void
undeployBundles(List<String> bundleNames)
Deprecated.since 9.3 usereloadBundles(ReloadContext)
instead.void
undeployBundles(List<String> bundleNames, boolean reloadResources)
Deprecated.since 9.3 usereloadBundles(ReloadContext)
instead.-
Methods inherited from interface org.nuxeo.runtime.service.TimestampedService
getLastModified, setLastModified
-
-
-
-
Field Detail
-
RELOAD_TOPIC
static final String RELOAD_TOPIC
- See Also:
- Constant Field Values
-
FLUSH_EVENT_ID
static final String FLUSH_EVENT_ID
- See Also:
- Constant Field Values
-
BEFORE_RELOAD_EVENT_ID
static final String BEFORE_RELOAD_EVENT_ID
- See Also:
- Constant Field Values
-
RELOAD_EVENT_ID
static final String RELOAD_EVENT_ID
- See Also:
- Constant Field Values
-
AFTER_RELOAD_EVENT_ID
static final String AFTER_RELOAD_EVENT_ID
- See Also:
- Constant Field Values
-
FLUSH_SEAM_EVENT_ID
static final String FLUSH_SEAM_EVENT_ID
- See Also:
- Constant Field Values
-
RELOAD_SEAM_EVENT_ID
static final String RELOAD_SEAM_EVENT_ID
- See Also:
- Constant Field Values
-
USE_COMPAT_HOT_RELOAD
static final String USE_COMPAT_HOT_RELOAD
This property allows to use the former way to hot reload Nuxeo server.The property and the former mechanism will be removed in the next LTS version.
- Since:
- 9.3
- See Also:
- Constant Field Values
-
-
Method Detail
-
reload
void reload() throws InterruptedException
Sends a runtime event with idRELOAD_EVENT_ID
so that listeners can be notified that a reload has been done.Also calls
reloadProperties()
by default, but not other reload methods as they could alter the running application behaviour.- Throws:
InterruptedException
- Since:
- 5.5
- See Also:
reloadProperties()
-
reloadProperties
void reloadProperties() throws IOException
Reloads runtime framework properties- Throws:
IOException
-
reloadSeamComponents
void reloadSeamComponents()
Sends a runtime event with idRELOAD_SEAM_EVENT_ID
- Since:
- 5.5
-
flush
void flush()
Sends a runtime event with idFLUSH_EVENT_ID
so that listeners can be notified that a flush is needed (after a reload for instance).Also calls
flushJaasCache()
by default, but not other flush methods as they could alter the running application behaviour.- Since:
- 5.5
- See Also:
flushJaasCache()
-
lastFlushed
Long lastFlushed()
Returns the last time one of the flush commands where called on this service instance (flush()
orflushJaasCache()
orflushSeamComponents()
, or null if never called.- Since:
- 5.6
-
flushJaasCache
void flushJaasCache()
Sends an event that can trigger reset of JaasCache.
-
flushSeamComponents
void flushSeamComponents()
Sends a runtime event with idFLUSH_SEAM_EVENT_ID
.- Since:
- 5.6
-
deployBundle
@Deprecated(since="9.3") default void deployBundle(File file) throws org.osgi.framework.BundleException
Deprecated.since 9.3 usereloadBundles(ReloadContext)
instead. Kept for backward compatibility.Deploys bundle to the runtime, without reloading resources.- Throws:
org.osgi.framework.BundleException
- Since:
- 5.5
- See Also:
deployBundles(List, boolean)
-
deployBundle
@Deprecated(since="9.3") default void deployBundle(File file, boolean reloadResources) throws org.osgi.framework.BundleException
Deprecated.since 9.3 usereloadBundles(ReloadContext)
instead. Kept for backward compatibility.Deploys bundle to the runtime, gives possibility to control resources reloading.- Throws:
org.osgi.framework.BundleException
- Since:
- 5.5
- See Also:
deployBundles(List, boolean)
-
deployBundles
@Deprecated(since="9.3") default void deployBundles(List<File> files) throws org.osgi.framework.BundleException
Deprecated.since 9.3 usereloadBundles(ReloadContext)
instead. Kept for backward compatibility.Deploys bundles to the runtime, without reloading resources.- Throws:
org.osgi.framework.BundleException
- Since:
- 9.3
- See Also:
deployBundles(List, boolean)
-
deployBundles
@Deprecated(since="9.3") void deployBundles(List<File> files, boolean reloadResources) throws org.osgi.framework.BundleException
Deprecated.since 9.3 usereloadBundles(ReloadContext)
instead. Kept for backward compatibility.Deploys bundles to the runtime, gives possibility to control resources reloading.- Throws:
org.osgi.framework.BundleException
- Since:
- 9.3
-
undeployBundle
@Deprecated(since="9.3") default void undeployBundle(String bundleName) throws org.osgi.framework.BundleException
Deprecated.since 9.3 usereloadBundles(ReloadContext)
instead. Kept for backward compatibility.Undeploys bundle from the runtime, without reloading resources.- Throws:
org.osgi.framework.BundleException
- Since:
- 5.6
- See Also:
undeployBundles(List, boolean)
-
undeployBundle
@Deprecated(since="9.3") default void undeployBundle(String bundleName, boolean reloadResources) throws org.osgi.framework.BundleException
Deprecated.since 9.3 usereloadBundles(ReloadContext)
instead. Kept for backward compatibility.Undeploys bundle from the runtime, gives possibility to control resources reloading.- Throws:
org.osgi.framework.BundleException
- Since:
- 9.3
- See Also:
undeployBundles(List, boolean)
-
undeployBundles
@Deprecated(since="9.3") default void undeployBundles(List<String> bundleNames) throws org.osgi.framework.BundleException
Deprecated.since 9.3 usereloadBundles(ReloadContext)
instead. Kept for backward compatibility.Undeploys bundles from the runtime, without reloading resources.- Throws:
org.osgi.framework.BundleException
- Since:
- 9.3
- See Also:
undeployBundles(List, boolean)
-
undeployBundles
@Deprecated(since="9.3") void undeployBundles(List<String> bundleNames, boolean reloadResources) throws org.osgi.framework.BundleException
Deprecated.since 9.3 usereloadBundles(ReloadContext)
instead. Kept for backward compatibility.Undeploys bundles from the runtime, gives possibility to control resources reloading.- Throws:
org.osgi.framework.BundleException
- Since:
- 9.3
-
reloadBundles
ReloadResult reloadBundles(ReloadContext context) throws org.osgi.framework.BundleException
Called by ReloadServiceInvoker#hotReloadBundles.- Returns:
- the result of hot reload operation
- Throws:
org.osgi.framework.BundleException
- Since:
- 9.3
-
runDeploymentPreprocessor
void runDeploymentPreprocessor() throws IOException
Runs the deployment preprocessor.- Throws:
IOException
- Since:
- 5.6
- See Also:
DeploymentPreprocessor
-
installWebResources
@Deprecated void installWebResources(File file) throws IOException
Deprecated.since 5.6: userunDeploymentPreprocessor()
method instead, now re-deploys all jars so that the nuxeo.war holds the same content than it would at startup. This method is called by reflection by ReloadServiceInvoker#hotDeployBundles. Keep it as compatibility code until NXP-9642 is done.Copies the bundle web resources into the nuxeo WAR directory.- Throws:
IOException
- Since:
- 5.5
-
-