org.apache.avalon.composition.model.impl
Class DefaultClassLoaderContext

java.lang.Object
  extended byorg.apache.avalon.framework.context.DefaultContext
      extended byorg.apache.avalon.composition.model.impl.DefaultClassLoaderContext
All Implemented Interfaces:
ClassLoaderContext, Context

public class DefaultClassLoaderContext
extends DefaultContext
implements ClassLoaderContext

Implementation of a system context that exposes a system wide set of parameters.

Version:
$Revision: 1.8 $ $Date: 2004/05/09 23:51:08 $
Author:
Avalon Development Team

Constructor Summary
DefaultClassLoaderContext(Logger logger, SystemContext system, ClassLoader parent, ClassLoaderDirective directive)
          Creation of a root classloader context.
DefaultClassLoaderContext(Logger logger, SystemContext system, ClassLoader parent, OptionalPackage[] packages, ExtensionManager manager, TypeRepository types, ServiceRepository services, ClassLoaderDirective directive, URL[] implied)
          Creation of a new classloader context.
 
Method Summary
 File getBaseDirectory()
          Return the base directory from which relative library directives and fileset directory paths may be resolved.
 ClassLoader getClassLoader()
          Return the classloader to be assigned as the parernt classloader.
 ClassLoaderDirective getClassLoaderDirective()
          Return the classloader directive to be applied to the classloader model.
 ExtensionManager getExtensionManager()
          Return the extension manager established by the parent classloader model.
 URL[] getImplicitURLs()
          Return any implied urls to include in the classloader.
 Logger getLogger()
          Return the system logging channel.
 OptionalPackage[] getOptionalPackages()
          Return the containment classloader.
 Repository getRepository()
          Return the system context.
 ServiceRepository getServiceRepository()
          Return the service repository established by the parent classloader.
 SystemContext getSystemContext()
          Return the system context.
 TypeRepository getTypeRepository()
          Return the type repository established by the parent classloader.
 
Methods inherited from class org.apache.avalon.framework.context.DefaultContext
checkWriteable, get, getContextData, getParent, hide, makeReadOnly, put
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.avalon.framework.context.Context
get
 

Constructor Detail

DefaultClassLoaderContext

public DefaultClassLoaderContext(Logger logger,
                                 SystemContext system,
                                 ClassLoader parent,
                                 ClassLoaderDirective directive)
Creation of a root classloader context.

Parameters:
logger - the logging channel to assign to the classloader model
system - the system context
parent - the parent classloader
directive - the classloader directive

DefaultClassLoaderContext

public DefaultClassLoaderContext(Logger logger,
                                 SystemContext system,
                                 ClassLoader parent,
                                 OptionalPackage[] packages,
                                 ExtensionManager manager,
                                 TypeRepository types,
                                 ServiceRepository services,
                                 ClassLoaderDirective directive,
                                 URL[] implied)
Creation of a new classloader context.

Parameters:
logger - the logging channel to assign to the classloader model
system - the system context
parent - the parent classloader
packages - the set of optional packages established under current classloader chain
manager - the optional extions package manager established by the parent classloader
types - the parent type manager
services - the parent service manager
directive - the classloader directive
Method Detail

getLogger

public Logger getLogger()
Return the system logging channel.

Specified by:
getLogger in interface ClassLoaderContext
Returns:
the system logging channel

getRepository

public Repository getRepository()
Return the system context.

Specified by:
getRepository in interface ClassLoaderContext
Returns:
the system context

getBaseDirectory

public File getBaseDirectory()
Return the base directory from which relative library directives and fileset directory paths may be resolved.

Specified by:
getBaseDirectory in interface ClassLoaderContext
Returns:
the base directory

getClassLoader

public ClassLoader getClassLoader()
Return the classloader to be assigned as the parernt classloader.

Specified by:
getClassLoader in interface ClassLoaderContext
Returns:
the classloader

getOptionalPackages

public OptionalPackage[] getOptionalPackages()
Return the containment classloader.

Specified by:
getOptionalPackages in interface ClassLoaderContext
Returns:
the classloader

getExtensionManager

public ExtensionManager getExtensionManager()
Return the extension manager established by the parent classloader model.

Specified by:
getExtensionManager in interface ClassLoaderContext
Returns:
the extension manager

getTypeRepository

public TypeRepository getTypeRepository()
Return the type repository established by the parent classloader.

Specified by:
getTypeRepository in interface ClassLoaderContext
Returns:
the type repository

getServiceRepository

public ServiceRepository getServiceRepository()
Return the service repository established by the parent classloader.

Specified by:
getServiceRepository in interface ClassLoaderContext
Returns:
the service repository

getClassLoaderDirective

public ClassLoaderDirective getClassLoaderDirective()
Return the classloader directive to be applied to the classloader model.

Specified by:
getClassLoaderDirective in interface ClassLoaderContext
Returns:
the classloader directive

getSystemContext

public SystemContext getSystemContext()
Return the system context.

Specified by:
getSystemContext in interface ClassLoaderContext
Returns:
the system context

getImplicitURLs

public URL[] getImplicitURLs()
Return any implied urls to include in the classloader.

Specified by:
getImplicitURLs in interface ClassLoaderContext
Returns:
the implied urls


Copyright © The Apache Software Foundation. All Rights Reserved.