org.jboss.seam.deployment
Class HotDeploymentStrategy

java.lang.Object
  extended by org.jboss.seam.deployment.DeploymentStrategy
      extended by org.jboss.seam.deployment.HotDeploymentStrategy
Direct Known Subclasses:
GroovyHotDeploymentStrategy

public class HotDeploymentStrategy
extends DeploymentStrategy

A deployment strategy for hot deployable Java Seam components

Author:
Pete Muir

Field Summary
static String DEFAULT_HOT_DEPLOYMENT_DIRECTORY_PATH
          The default path at which hot deployable Seam components are placed
static String HANDLERS_KEY
          The key under which to list extra deployment handlers.
static String NAME
          The contextual variable name this deployment strategy is made available at during Seam startup.
 
Fields inherited from class org.jboss.seam.deployment.DeploymentStrategy
SCANNERS_KEY
 
Constructor Summary
HotDeploymentStrategy(ClassLoader classLoader, File hotDeployDirectory, javax.servlet.ServletContext servletContext, boolean enabled)
           
 
Method Summary
 boolean available()
          It is both enabled and the classpath was detected.
static HotDeploymentStrategy createInstance(String className, ClassLoader classLoader, File hotDeployDirectory, javax.servlet.ServletContext servletContext, boolean enabled)
          Dynamically instantiate a HotDeploymentStrategy Needed to prevent dependency on optional librarires
 Map<String,Set<Class<?>>> getAnnotatedClasses()
           
 ClassLoader getClassLoader()
          Get the classloader to use
protected  String getDeploymentHandlersKey()
           
 File[] getHotDeploymentPaths()
          Get all hot deployable paths
 Set<ClassDescriptor> getScannedComponentClasses()
          Get all Components which the strategy has scanned and handled
 javax.servlet.ServletContext getServletContext()
          Get the ServletContext to use
static HotDeploymentStrategy instance()
           
 boolean isEnabled()
           
 boolean isFromHotDeployClassLoader(Class componentClass)
          Return true if the component is from a hot deployment classloader
 boolean isHotDeployClassLoaderEnabled()
           
 void scan()
          Do the scan for resources Should only be called by Seam
 
Methods inherited from class org.jboss.seam.deployment.DeploymentStrategy
getDeploymentHandlers, getFiles, getScanner, getTimestamp, initScanner, postScan, setFiles
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_HOT_DEPLOYMENT_DIRECTORY_PATH

public static final String DEFAULT_HOT_DEPLOYMENT_DIRECTORY_PATH
The default path at which hot deployable Seam components are placed

See Also:
Constant Field Values

NAME

public static final String NAME
The contextual variable name this deployment strategy is made available at during Seam startup.

See Also:
Constant Field Values

HANDLERS_KEY

public static final String HANDLERS_KEY
The key under which to list extra deployment handlers. This can be specified as a System property or in /META-INF/seam-deployment.properties

See Also:
Constant Field Values
Constructor Detail

HotDeploymentStrategy

public HotDeploymentStrategy(ClassLoader classLoader,
                             File hotDeployDirectory,
                             javax.servlet.ServletContext servletContext,
                             boolean enabled)
Parameters:
classLoader - The parent classloader of the hot deployment classloader
hotDeployDirectory - The directory in which hot deployable Seam components are placed
Method Detail

available

public boolean available()
It is both enabled and the classpath was detected. Admittedly, this seems like a redundant confirmation.


isEnabled

public boolean isEnabled()

isHotDeployClassLoaderEnabled

public boolean isHotDeployClassLoaderEnabled()

getDeploymentHandlersKey

protected String getDeploymentHandlersKey()
Specified by:
getDeploymentHandlersKey in class DeploymentStrategy

getHotDeploymentPaths

public File[] getHotDeploymentPaths()
Get all hot deployable paths


isFromHotDeployClassLoader

public boolean isFromHotDeployClassLoader(Class componentClass)
Return true if the component is from a hot deployment classloader


createInstance

public static HotDeploymentStrategy createInstance(String className,
                                                   ClassLoader classLoader,
                                                   File hotDeployDirectory,
                                                   javax.servlet.ServletContext servletContext,
                                                   boolean enabled)
Dynamically instantiate a HotDeploymentStrategy Needed to prevent dependency on optional librarires

Parameters:
className - The strategy to use
classLoader - The classloader to use with this strategy
hotDeployDirectory - The directory which contains hot deployable Seam components

getClassLoader

public ClassLoader getClassLoader()
Description copied from class: DeploymentStrategy
Get the classloader to use

Specified by:
getClassLoader in class DeploymentStrategy

getScannedComponentClasses

public Set<ClassDescriptor> getScannedComponentClasses()
Get all Components which the strategy has scanned and handled


getAnnotatedClasses

public Map<String,Set<Class<?>>> getAnnotatedClasses()

scan

public void scan()
Description copied from class: DeploymentStrategy
Do the scan for resources Should only be called by Seam

Specified by:
scan in class DeploymentStrategy

instance

public static HotDeploymentStrategy instance()

getServletContext

public javax.servlet.ServletContext getServletContext()
Description copied from class: DeploymentStrategy
Get the ServletContext to use

Specified by:
getServletContext in class DeploymentStrategy