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

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

public class DefaultContainmentContext
extends DefaultContext
implements ContainmentContext

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

Version:
$Revision: 1.1.1.1 $ $Date: 2003/08/31 14:30:16 $
Author:
Avalon Development Team

Constructor Summary
DefaultContainmentContext(Logger logger, SystemContext system, ClassLoaderModel model, ContainmentProfile profile)
          Creation of a new containment context.
DefaultContainmentContext(Logger logger, SystemContext system, ClassLoaderModel model, File home, File temp, ContainmentProfile profile, String partition, String name)
          Creation of a new containment context.
 
Method Summary
 ClassLoader getClassLoader()
          Return the containment classloader.
 ClassLoaderModel getClassLoaderModel()
          Return the containment classloader model.
 ContainmentProfile getContainmentProfile()
          Return the containment profile.
 File getHomeDirectory()
          Return the working directory from which containers may establish persistent content.
 Logger getLogger()
          Return the logging channel.
 String getName()
          Return the name that the container has been assigned.
 String getPartitionName()
          Return the partition name that the container is established with.
 SystemContext getSystemContext()
          Return the system context.
 File getTempDirectory()
          Return the temporary directory from which a container may use to establish a transient content directory.
 
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

DefaultContainmentContext

public DefaultContainmentContext(Logger logger,
                                 SystemContext system,
                                 ClassLoaderModel model,
                                 ContainmentProfile profile)
Creation of a new containment context.

Parameters:
logger - the logging channel to assign
system - the system context
model - the classloader model
profile - the containment profile

DefaultContainmentContext

public DefaultContainmentContext(Logger logger,
                                 SystemContext system,
                                 ClassLoaderModel model,
                                 File home,
                                 File temp,
                                 ContainmentProfile profile,
                                 String partition,
                                 String name)
Creation of a new containment context.

Parameters:
logger - the logging channel to assign
system - the system context
model - the classloader model
home - the directory for the container
temp - a temporary directory for the container
profile - the containment profile
partition - the partition that this containment context is established within
name - the assigned containment context name
Method Detail

getName

public String getName()
Return the name that the container has been assigned.

Specified by:
getName in interface ContainmentContext
Returns:
the container name

getPartitionName

public String getPartitionName()
Return the partition name that the container is established with.

Specified by:
getPartitionName in interface ContainmentContext
Returns:
the partition name

getLogger

public Logger getLogger()
Return the logging channel.

Specified by:
getLogger in interface ContainmentContext
Returns:
the containment models logging channel

getSystemContext

public SystemContext getSystemContext()
Return the system context.

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

getHomeDirectory

public File getHomeDirectory()
Return the working directory from which containers may establish persistent content.

Specified by:
getHomeDirectory in interface ContainmentContext
Returns:
the working directory

getTempDirectory

public File getTempDirectory()
Return the temporary directory from which a container may use to establish a transient content directory.

Specified by:
getTempDirectory in interface ContainmentContext
Returns:
the temporary directory

getContainmentProfile

public ContainmentProfile getContainmentProfile()
Return the containment profile.

Specified by:
getContainmentProfile in interface ContainmentContext
Returns:
the containment profile

getClassLoaderModel

public ClassLoaderModel getClassLoaderModel()
Return the containment classloader model.

Specified by:
getClassLoaderModel in interface ContainmentContext
Returns:
the classloader model

getClassLoader

public ClassLoader getClassLoader()
Return the containment classloader. This method is a convinience operation equivalent to getClassLoaderModel().getClassLoader();

Specified by:
getClassLoader in interface ContainmentContext
Returns:
the classloader


Copyright © Apache Software Foundation. All Rights Reserved.