Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.codehaus.aspectwerkz.definition
Class SystemDefinitionContainer

    java.lang.Object
      org.codehaus.aspectwerkz.definition.SystemDefinitionContainer

    public class SystemDefinitionContainer

extends Object

The SystemDefintionContainer maintains all the definition and is aware of the classloader hierarchy.

A ThreadLocal structure is used during weaving to store current classloader defintion hierarchy.

Due to getResources() API, we maintain a perClassLoader loaded resource list so that it contains only resource defined within the classloader and not its parent.

Author:
  Alexandre Vasseur

Field Summary
`static String` | `AOP_META_INF_XML_FILE` The AOP deployment descriptor for any deployed unit Note: Tomcat 5 does not handles war/META-INF
`static String` | `AOP_WEB_INF_XML_FILE` The AOP deployment descriptor for any deployed unit in a webapp TODO for EAR/EJB/JCA stuff
`static Map` | `s_classLoaderDefinitionLocations` Map of SystemDefinition location (as URL[List]) per ClassLoader NOTE: null key is supported
`static Map` | `s_classLoaderHierarchicalSystemDefinitions` Map of SystemDefinition[List] per ClassLoader, with the hierarchy structure NOTE: null key is supported
`static Map` | `s_classLoaderSystemDefinitions` Map of SystemDefinition[List] per ClassLoader.
`static String` | `URL_JVM_OPTION_SYSTEM` Default location for default AspectWerkz definition file, JVM wide
`static String` | `WEB_WEB_INF_XML_FILE`

Constructor Summary
`SystemDefinitionContainer()`

Method Summary
`static void` | `deployDefinitions(ClassLoader loader, Set definitions)` Hotdeploy a list of SystemDefintions as defined at the level of the given ClassLoader Note: this is used for Offline mode.
`static void` | `disableSystemWideDefinition()` Turns on the option to avoid -Daspectwerkz.definition.file handling.
`static SystemDefinition` | `getDefinitionFor(ClassLoader loader, String uuid)` Lookup for a given SystemDefinition by uuid within a given ClassLoader.
`static Set` | `getDefinitionsAt(ClassLoader loader)` Return the list of SystemDefinitions defined at the given ClassLoader level.
`static Set` | `getDefinitionsFor(ClassLoader loader)` Return the list of SystemDefinitions visible at the given ClassLoader level.
`static SystemDefinition` | `getVirtualDefinitionAt(ClassLoader loader)` Returns the virtual system for the class loader specified.
`static String` | `getVirtualDefinitionUuid(ClassLoader loader)` Returns the uuid for the virtual system definition for the given classloader

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### s_classLoaderSystemDefinitions

    public static final Map s_classLoaderSystemDefinitions

  Map of SystemDefinition[List] per ClassLoader. NOTE: null key is supported

### s_classLoaderHierarchicalSystemDefinitions

    public static Map s_classLoaderHierarchicalSystemDefinitions

  Map of SystemDefinition[List] per ClassLoader, with the hierarchy structure NOTE: null key is supported

### s_classLoaderDefinitionLocations

    public static final Map s_classLoaderDefinitionLocations

  Map of SystemDefinition location (as URL[List]) per ClassLoader NOTE: null key is supported

### URL_JVM_OPTION_SYSTEM

    public static final String URL_JVM_OPTION_SYSTEM

  Default location for default AspectWerkz definition file, JVM wide

### AOP_META_INF_XML_FILE

    public static final String AOP_META_INF_XML_FILE

  The AOP deployment descriptor for any deployed unit Note: Tomcat 5 does not handles war/META-INF

  See Also:
    Constant Field Values

### AOP_WEB_INF_XML_FILE

    public static final String AOP_WEB_INF_XML_FILE

  The AOP deployment descriptor for any deployed unit in a webapp TODO for EAR/EJB/JCA stuff

  See Also:
    Constant Field Values

### WEB_WEB_INF_XML_FILE

    public static final String WEB_WEB_INF_XML_FILE

See Also:
  Constant Field Values

Constructor Detail

### SystemDefinitionContainer

    public SystemDefinitionContainer()

Method Detail

### deployDefinitions

    public static void deployDefinitions(ClassLoader loader,
                                         Set definitions)

  Hotdeploy a list of SystemDefintions as defined at the level of the given ClassLoader

  Note: this is used for Offline mode.

  Parameters:
    `loader` - ClassLoader
    `definitions` - SystemDefinitions list

### getDefinitionFor

    public static SystemDefinition getDefinitionFor(ClassLoader loader,
                                                    String uuid)

  Lookup for a given SystemDefinition by uuid within a given ClassLoader.

  The lookup does go thru the ClassLoader hierarchy

  Parameters:
    `loader` - ClassLoader
    `uuid` - system uuid
  Returns:
    SystemDefinition or null if no such defined definition

### getDefinitionsFor

    public static Set getDefinitionsFor(ClassLoader loader)

  Return the list of SystemDefinitions visible at the given ClassLoader level.

  It does handle the ClassLoader hierarchy.

  Parameters:
    `loader` -
  Returns:
    SystemDefinitions list

### getDefinitionsAt

    public static Set getDefinitionsAt(ClassLoader loader)

  Return the list of SystemDefinitions defined at the given ClassLoader level.

  It does NOT handle the ClassLoader hierarchy.

  Parameters:
    `loader` -
  Returns:
    SystemDefinitions list

### getVirtualDefinitionAt

    public static SystemDefinition getVirtualDefinitionAt(ClassLoader loader)

  Returns the virtual system for the class loader specified.

  There is ONE and ONLY ONE virtual system per classloader ie several per classloader hierachy. This definition hosts hotdeployed aspects. This method returns the one corresponding to the given classloader only.

  Parameters:
    `loader` - the class loader
  Returns:
    the virtual system

### getVirtualDefinitionUuid

    public static String getVirtualDefinitionUuid(ClassLoader loader)

  Returns the uuid for the virtual system definition for the given classloader

  Parameters:
    `loader` -
  Returns:

### disableSystemWideDefinition

    public static void disableSystemWideDefinition()

  Turns on the option to avoid -Daspectwerkz.definition.file handling.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002-2005 Jonas Bonér, Alexandre Vasseur. All Rights Reserved.