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, unregisterExtension
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getLastModified, setLastModified
public static org.osgi.framework.BundleContext getBundleContext()
public static org.osgi.framework.Bundle getBundle()
public void activate(ComponentContext context) throws Exception
Component
This method is called by the runtime when a component is activated.
activate
in interface Component
activate
in class DefaultComponent
context
- the runtime contextException
- if an error occurs during activationpublic void deactivate(ComponentContext context) throws Exception
Component
This method is called by the runtime when a component is deactivated.
deactivate
in interface Component
deactivate
in class DefaultComponent
context
- the runtime contextException
- if an error occurs during activationpublic void reload() throws Exception
ReloadService
ReloadService.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 ReloadService
Exception
ReloadService.reloadProperties()
public void reloadProperties() throws Exception
ReloadService
reloadProperties
in interface ReloadService
Exception
public void reloadRepository() throws Exception
ReloadService
reloadRepository
in interface ReloadService
Exception
public void reloadSeamComponents() throws Exception
ReloadService
ReloadService.RELOAD_SEAM_EVENT_ID
reloadSeamComponents
in interface ReloadService
Exception
public void flush() throws Exception
ReloadService
ReloadService.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
Exception
#flushJaasCache()}
public void flushJaasCache() throws Exception
ReloadService
flushJaasCache
in interface ReloadService
Exception
public void flushSeamComponents() throws Exception
ReloadService
ReloadService.FLUSH_SEAM_EVENT_ID
flushSeamComponents
in interface ReloadService
Exception
public String deployBundle(File file) throws Exception
ReloadService
deployBundle
in interface ReloadService
Exception
ReloadService.deployBundle(File, boolean)
public String deployBundle(File file, boolean reloadResourceClasspath) throws MalformedURLException, org.osgi.framework.BundleException
ReloadService
deployBundle
in interface ReloadService
MalformedURLException
org.osgi.framework.BundleException
public void undeployBundle(File file, boolean reloadResources) throws Exception
ReloadService
undeployBundle
in interface ReloadService
Exception
public void undeployBundle(String bundleName) throws Exception
ReloadService
undeployBundle
in interface ReloadService
Exception
public Long lastFlushed()
ReloadService
ReloadService.flush()
or ReloadService.flushJaasCache()
or
ReloadService.flushSeamComponents()
, or null if never calledlastFlushed
in interface ReloadService
@Deprecated public void installWebResources(File file) throws Exception
runDeploymentPreprocessor()
insteadReloadService
installWebResources
in interface ReloadService
Exception
public void runDeploymentPreprocessor() throws Exception
ReloadService
runDeploymentPreprocessor
in interface ReloadService
Exception
public String getOSGIBundleName(File file)
ReloadService
getOSGIBundleName
in interface ReloadService
Copyright © 2013 Nuxeo SA. All Rights Reserved.