public class ReloadComponent extends DefaultComponent implements ReloadService
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 |
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.
|
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
|
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, unregisterContribution, unregisterExtensionequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetLastModified, setLastModifiedpublic static org.osgi.framework.BundleContext getBundleContext()
public static org.osgi.framework.Bundle getBundle()
public void activate(ComponentContext context) throws Exception
ComponentThis method is called by the runtime when a component is activated.
activate in interface Componentactivate in class DefaultComponentcontext - the runtime contextException - if an error occurs during activationpublic void deactivate(ComponentContext context) throws Exception
ComponentThis method is called by the runtime when a component is deactivated.
deactivate in interface Componentdeactivate in class DefaultComponentcontext - the runtime contextException - if an error occurs during activationpublic void reload()
throws Exception
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 ReloadServiceExceptionReloadService.reloadProperties()public void reloadProperties()
throws Exception
ReloadServicereloadProperties in interface ReloadServiceExceptionpublic void reloadRepository()
throws Exception
ReloadServicereloadRepository in interface ReloadServiceExceptionpublic void reloadSeamComponents()
throws Exception
ReloadServiceReloadService.RELOAD_SEAM_EVENT_IDreloadSeamComponents in interface ReloadServiceExceptionpublic void flush()
throws Exception
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 ReloadServiceException#flushJaasCache()}public void flushJaasCache()
throws Exception
ReloadServiceflushJaasCache in interface ReloadServiceExceptionpublic void flushSeamComponents()
throws Exception
ReloadServiceReloadService.FLUSH_SEAM_EVENT_IDflushSeamComponents in interface ReloadServiceExceptionpublic String deployBundle(File file) throws Exception
ReloadServicedeployBundle in interface ReloadServiceExceptionReloadService.deployBundle(File, boolean)public String deployBundle(File file, boolean reloadResourceClasspath) throws MalformedURLException, org.osgi.framework.BundleException
ReloadServicedeployBundle in interface ReloadServiceMalformedURLExceptionorg.osgi.framework.BundleExceptionpublic void undeployBundle(File file, boolean reloadResources) throws Exception
ReloadServiceundeployBundle in interface ReloadServiceExceptionpublic void undeployBundle(String bundleName) throws Exception
ReloadServiceundeployBundle in interface ReloadServiceExceptionpublic Long lastFlushed()
ReloadServiceReloadService.flush() or ReloadService.flushJaasCache() or
ReloadService.flushSeamComponents(), or null if never calledlastFlushed in interface ReloadService@Deprecated public void installWebResources(File file) throws Exception
runDeploymentPreprocessor() insteadReloadServiceinstallWebResources in interface ReloadServiceExceptionpublic void runDeploymentPreprocessor()
throws Exception
ReloadServicerunDeploymentPreprocessor in interface ReloadServiceExceptionpublic String getOSGIBundleName(File file)
ReloadServicegetOSGIBundleName in interface ReloadServiceCopyright © 2014 Nuxeo SA. All rights reserved.