public class ReloadComponent extends DefaultComponent implements ReloadService
| Modifier and Type | Field and Description |
|---|---|
protected static org.osgi.framework.Bundle |
bundle |
protected Long |
lastFlushed |
lastModifiedAFTER_RELOAD_EVENT_ID, BEFORE_RELOAD_EVENT_ID, FLUSH_EVENT_ID, FLUSH_SEAM_EVENT_ID, RELOAD_EVENT_ID, RELOAD_REPOSITORIES_ID, RELOAD_SEAM_EVENT_ID, RELOAD_TOPIC| Constructor and Description |
|---|
ReloadComponent() |
| Modifier and Type | Method and Description |
|---|---|
void |
activate(ComponentContext context)
Activates the component.
|
void |
deactivate(ComponentContext context)
Deactivates the component.
|
String |
deployBundle(File file)
Deploys bundle to the runtime, without reloading resources
|
String |
deployBundle(File file,
boolean reloadResourceClasspath)
Deploys bundle to the runtime, gives possibility to control resources reloading.
|
void |
flush()
Sends a runtime event with id
ReloadService.FLUSH_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 id
ReloadService.FLUSH_SEAM_EVENT_ID |
protected static File |
getAppDir() |
static org.osgi.framework.Bundle |
getBundle() |
static org.osgi.framework.BundleContext |
getBundleContext() |
String |
getOSGIBundleName(File file)
Returns the OSGI bundle name if given file can be identified as an OSGI bundle, or null.
|
protected String |
getRuntimeStatus() |
protected static File |
getWarDir() |
void |
installWebResources(File file)
Deprecated.
since 5.6, use
runDeploymentPreprocessor() instead |
Long |
lastFlushed()
Returns the last time one of the flush commands where called on this service instance (
ReloadService.flush() or
ReloadService.flushJaasCache() or ReloadService.flushSeamComponents(), or null if never called |
void |
reload()
Sends a runtime event with id
ReloadService.RELOAD_EVENT_ID so that listeners can be notified that a reload has been
done. |
void |
reloadProperties()
Reloads runtime framework properties
|
void |
reloadRepository()
Reloads the Nuxeo repository configuration
|
void |
reloadSeamComponents()
Sends a runtime event with id
ReloadService.RELOAD_SEAM_EVENT_ID |
void |
runDeploymentPreprocessor()
Runs the deployment preprocessor
|
protected void |
setFlushedNow()
Sets the last date date to current date timestamp
|
protected void |
triggerReloadWithNewTransaction(String id) |
protected void |
triggerReloadWithPassivate(String id) |
void |
undeployBundle(File file,
boolean reloadResources)
Undeploys bundle from the runtime, given the bundle resource, gives possibility to control resources reloading
|
void |
undeployBundle(String bundleName)
Undeploys bundle from the runtime, given the bundle filename
|
applicationStarted, getAdapter, getApplicationStartedOrder, getLastModified, registerContribution, registerExtension, setLastModified, setModifiedNow, unregisterContribution, unregisterExtensionclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetLastModified, setLastModifiedprotected static org.osgi.framework.Bundle bundle
protected Long lastFlushed
public ReloadComponent()
public static org.osgi.framework.BundleContext getBundleContext()
public static org.osgi.framework.Bundle getBundle()
public void activate(ComponentContext context)
ComponentThis method is called by the runtime when a component is activated.
activate in interface Componentactivate in class DefaultComponentcontext - the runtime contextpublic void deactivate(ComponentContext context)
ComponentThis method is called by the runtime when a component is deactivated.
deactivate in interface Componentdeactivate in class DefaultComponentcontext - the runtime contextpublic void reload()
ReloadServiceReloadService.RELOAD_EVENT_ID so that listeners can be notified that a reload has been
done.
Also calls ReloadService.reloadProperties() by default, but not other reload methods as they could alter the running
application behaviour.
reload in interface ReloadServiceReloadService.reloadProperties()public void reloadProperties() throws IOException
ReloadServicereloadProperties in interface ReloadServiceIOExceptionpublic void reloadRepository()
ReloadServicereloadRepository in interface ReloadServicepublic void reloadSeamComponents()
ReloadServiceReloadService.RELOAD_SEAM_EVENT_IDreloadSeamComponents in interface ReloadServicepublic void flush()
ReloadServiceReloadService.FLUSH_EVENT_ID so that listeners can be notified that a flush is needed
(after a reload for instance).
Also calls ReloadService.flushJaasCache() by default, but not other flush methods as they could alter the running
application behaviour.
flush in interface ReloadService#flushJaasCache()}public void flushJaasCache()
ReloadServiceflushJaasCache in interface ReloadServicepublic void flushSeamComponents()
ReloadServiceReloadService.FLUSH_SEAM_EVENT_IDflushSeamComponents in interface ReloadServicepublic String deployBundle(File file) throws org.osgi.framework.BundleException
ReloadServicedeployBundle in interface ReloadServiceorg.osgi.framework.BundleExceptionReloadService.deployBundle(File, boolean)public String deployBundle(File file, boolean reloadResourceClasspath) throws org.osgi.framework.BundleException
ReloadServicedeployBundle in interface ReloadServiceorg.osgi.framework.BundleExceptionpublic void undeployBundle(File file, boolean reloadResources) throws org.osgi.framework.BundleException
ReloadServiceundeployBundle in interface ReloadServiceorg.osgi.framework.BundleExceptionpublic void undeployBundle(String bundleName) throws org.osgi.framework.BundleException
ReloadServiceundeployBundle in interface ReloadServiceorg.osgi.framework.BundleExceptionpublic Long lastFlushed()
ReloadServiceReloadService.flush() or
ReloadService.flushJaasCache() or ReloadService.flushSeamComponents(), or null if never calledlastFlushed in interface ReloadServiceprotected void setFlushedNow()
@Deprecated public void installWebResources(File file) throws IOException
runDeploymentPreprocessor() insteadReloadServiceinstallWebResources in interface ReloadServiceIOExceptionpublic void runDeploymentPreprocessor() throws IOException
ReloadServicerunDeploymentPreprocessor in interface ReloadServiceIOExceptionpublic String getOSGIBundleName(File file)
ReloadServicegetOSGIBundleName in interface ReloadServiceprotected String getRuntimeStatus()
protected void triggerReloadWithNewTransaction(String id)
protected void triggerReloadWithPassivate(String id)
Copyright © 2016 Nuxeo SA. All rights reserved.