Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.runtime.reload
Class ReloadComponent

java.lang.Object
  extended by org.nuxeo.runtime.model.DefaultComponent
      extended by org.nuxeo.runtime.reload.ReloadComponent
All Implemented Interfaces:
Adaptable, Component, Extensible, ReloadService

public class ReloadComponent
extends DefaultComponent
implements ReloadService

Author:
Bogdan Stefanescu

Field Summary
static String FLUSH_EVENT_ID
           
static String RELOAD_EVENT_ID
           
static String RELOAD_TOPIC
           
 
Constructor Summary
ReloadComponent()
           
 
Method Summary
 void activate(ComponentContext context)
          Activates the component.
 void addJar(File file)
          Add a JAR to the application classloader - experimental.
 void deactivate(ComponentContext context)
          Deactivates the component.
 String deployBundle(File file)
           
 String deployBundle(File file, boolean reloadResourceClasspath)
           
 void flush()
          Sends a flush event so that listeners can be notified that a reload has been done.
 void flushJaasCache()
           
static File getAppDir()
           
static org.osgi.framework.Bundle getBundle()
           
static org.osgi.framework.BundleContext getBundleContext()
           
static File getWarDir()
           
 void installWebResources(File file)
          Copy web resources in nuxeo WAR
 void reload()
           
 void reloadProperties()
           
 void reloadRepository()
           
static void reloadResourceClassPath(Collection<String> files)
          Rebuild the framework resource class loader and add to it the given file paths.
 void reloadSeamComponents()
           
 void removeJar(File file)
          Remove a JAR from the application classloader - experimental.
 void undeployBundle(String name)
           
 
Methods inherited from class org.nuxeo.runtime.model.DefaultComponent
applicationStarted, getAdapter, registerContribution, registerExtension, unregisterContribution, unregisterExtension
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RELOAD_TOPIC

public static final String RELOAD_TOPIC
See Also:
Constant Field Values

FLUSH_EVENT_ID

public static final String FLUSH_EVENT_ID
See Also:
Constant Field Values

RELOAD_EVENT_ID

public static final String RELOAD_EVENT_ID
See Also:
Constant Field Values
Constructor Detail

ReloadComponent

public ReloadComponent()
Method Detail

getBundleContext

public static org.osgi.framework.BundleContext getBundleContext()

getBundle

public static org.osgi.framework.Bundle getBundle()

activate

public void activate(ComponentContext context)
              throws Exception
Description copied from interface: Component
Activates the component.

This method is called by the runtime when a component is activated.

Specified by:
activate in interface Component
Overrides:
activate in class DefaultComponent
Parameters:
context - the runtime context
Throws:
Exception - if an error occurs during activation

deactivate

public void deactivate(ComponentContext context)
                throws Exception
Description copied from interface: Component
Deactivates the component.

This method is called by the runtime when a component is deactivated.

Specified by:
deactivate in interface Component
Overrides:
deactivate in class DefaultComponent
Parameters:
context - the runtime context
Throws:
Exception - if an error occurs during activation

flushJaasCache

public void flushJaasCache()
                    throws Exception
Specified by:
flushJaasCache in interface ReloadService
Throws:
Exception

reloadRepository

public void reloadRepository()
                      throws Exception
Specified by:
reloadRepository in interface ReloadService
Throws:
Exception

flush

public void flush()
           throws Exception
Description copied from interface: ReloadService
Sends a flush event so that listeners can be notified that a reload has been done.

Specified by:
flush in interface ReloadService
Throws:
Exception

reload

public void reload()
            throws Exception
Specified by:
reload in interface ReloadService
Throws:
Exception

addJar

public void addJar(File file)
            throws Exception
Add a JAR to the application classloader - experimental.

Specified by:
addJar in interface ReloadService
Throws:
Exception

removeJar

public void removeJar(File file)
               throws Exception
Remove a JAR from the application classloader - experimental.

Specified by:
removeJar in interface ReloadService
Throws:
Exception

deployBundle

public String deployBundle(File file,
                           boolean reloadResourceClasspath)
                    throws Exception
Specified by:
deployBundle in interface ReloadService
Throws:
Exception

deployBundle

public String deployBundle(File file)
                    throws Exception
Specified by:
deployBundle in interface ReloadService
Throws:
Exception

undeployBundle

public void undeployBundle(String name)
                    throws Exception
Specified by:
undeployBundle in interface ReloadService
Throws:
Exception

reloadProperties

public void reloadProperties()
                      throws Exception
Specified by:
reloadProperties in interface ReloadService
Throws:
Exception

reloadResourceClassPath

public static void reloadResourceClassPath(Collection<String> files)
                                    throws Exception
Rebuild the framework resource class loader and add to it the given file paths.

The already added paths are removed from the class loader.

Throws:
Exception

installWebResources

public void installWebResources(File file)
                         throws Exception
Description copied from interface: ReloadService
Copy web resources in nuxeo WAR

Specified by:
installWebResources in interface ReloadService
Throws:
Exception

getAppDir

public static File getAppDir()

getWarDir

public static File getWarDir()

reloadSeamComponents

public void reloadSeamComponents()
                          throws Exception
Specified by:
reloadSeamComponents in interface ReloadService
Throws:
Exception

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.