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

java.lang.Object
  extended byorg.apache.avalon.framework.context.DefaultContext
      extended byorg.apache.avalon.composition.model.impl.DefaultDeploymentContext
          extended byorg.apache.avalon.composition.model.impl.DefaultComponentContext
All Implemented Interfaces:
ComponentContext, Context, DeploymentContext

public class DefaultComponentContext
extends DefaultDeploymentContext
implements ComponentContext

Default implementation of a deployment context that is used as the primary constructor argument when creating a new component model.

Version:
$Revision: 1.11 $ $Date: 2004/03/17 10:39:10 $
Author:
Avalon Development Team

Field Summary
 
Fields inherited from interface org.apache.avalon.composition.provider.ComponentContext
CLASSLOADER_KEY, HOME_KEY, NAME_KEY, PARTITION_KEY, TEMP_KEY
 
Fields inherited from interface org.apache.avalon.composition.provider.DeploymentContext
SEPARATOR
 
Constructor Summary
DefaultComponentContext(Logger logger, String name, SystemContext system, ClassLoader classloader, DependencyGraph graph, ContainmentModel model, ComponentProfile profile, Type type, Class clazz, File home, File temp, String partition)
          Creation of a new deployment context.
 
Method Summary
 ClassLoader getClassLoader()
          Return the classloader for the component.
 ComponentProfile getComponentProfile()
          Return the deployment profile.
 ContainmentModel getContainmentModel()
          Return the enclosing containment model.
 Class getDeploymentClass()
          Return the component class.
 File getHomeDirectory()
          Return the working directory.
 File getTempDirectory()
          Return the temporary directory.
 Type getType()
          Return the component type.
 
Methods inherited from class org.apache.avalon.composition.model.impl.DefaultDeploymentContext
getDependencyGraph, getLogger, getMode, getName, getPartitionName, getProfile, getQualifiedName, getSystemContext
 
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.composition.provider.ComponentContext
getSystemContext
 
Methods inherited from interface org.apache.avalon.composition.provider.DeploymentContext
getDependencyGraph, getLogger, getMode, getName, getPartitionName, getProfile, getQualifiedName
 
Methods inherited from interface org.apache.avalon.framework.context.Context
get
 

Constructor Detail

DefaultComponentContext

public DefaultComponentContext(Logger logger,
                               String name,
                               SystemContext system,
                               ClassLoader classloader,
                               DependencyGraph graph,
                               ContainmentModel model,
                               ComponentProfile profile,
                               Type type,
                               Class clazz,
                               File home,
                               File temp,
                               String partition)
Creation of a new deployment context.

Parameters:
logger - the logging channel to assign
name - the deployment context name
system - the system context
classloader - the containers classloader
graph - the containers dependency graph
model - the parent containment model
profile - the component deployment profile
type - the underlying component type
clazz - the component deployment class
home - the home working directory
temp - a temporary directory
partition - the partition name
Method Detail

getContainmentModel

public ContainmentModel getContainmentModel()
Return the enclosing containment model.

Specified by:
getContainmentModel in interface ComponentContext
Returns:
the containment model that component is within

getHomeDirectory

public File getHomeDirectory()
Return the working directory.

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

getTempDirectory

public File getTempDirectory()
Return the temporary directory.

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

getComponentProfile

public ComponentProfile getComponentProfile()
Return the deployment profile.

Specified by:
getComponentProfile in interface ComponentContext
Returns:
the profile

getType

public Type getType()
Return the component type.

Specified by:
getType in interface ComponentContext
Returns:
the type defintion

getDeploymentClass

public Class getDeploymentClass()
Return the component class.

Specified by:
getDeploymentClass in interface ComponentContext
Returns:
the class

getClassLoader

public ClassLoader getClassLoader()
Return the classloader for the component.

Specified by:
getClassLoader in interface ComponentContext
Returns:
the classloader


Copyright © The Apache Software Foundation. All Rights Reserved.