org.apache.avalon.composition.provider
Interface SystemContext

All Superinterfaces:
Context
All Known Implementing Classes:
DefaultSystemContext

public interface SystemContext
extends Context

Defintion 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

Method Summary
 void commission(DeploymentModel model)
          Request the commissioning of a runtime for a supplied deployment model.
 void decommission(DeploymentModel model)
          Request the decommissioning of a runtime for a supplied deployment model.
 File getAnchorDirectory()
          Return the anchor directory from which a container may use to resolve relative classpath references.
 ClassLoader getAPIClassLoader()
          Return the API classloader.
 File getBaseDirectory()
          Return the base directory from which relative references should be resolved.
 long getDefaultDeploymentTimeout()
          Return the default deployment phase timeout value.
 File getHomeDirectory()
          Return the home directory from which containers may establish persistent content.
 Logger getLogger()
          Return the system logging channel.
 LoggingManager getLoggingManager()
          Return the logging manager.
 ModelFactory getModelFactory()
          Return the model factory.
 Repository getRepository()
          Return the application repository from which resource directives can be resolved.
 ClassLoader getSPIClassLoader()
          Return the SPI classloader.
 File getTempDirectory()
          Return the temp directory from which containers may establish non-persistent content.
 boolean isCodeSecurityEnabled()
          Return the enabled status of the code security policy.
 boolean isTraceEnabled()
          Return the system trace flag.
 void release(DeploymentModel model, Object instance)
          Request the release of an object from the runtime.
 Object resolve(DeploymentModel model)
          Request resolution of an object from the runtime.
 Object resolve(DeploymentModel model, boolean proxy)
          Request resolution of an object from the runtime.
 String toString(Object object)
          Prepare a string representation of an object for presentation.
 String toString(Object[] objects)
          Prepare a string representation of an object array for presentation.
 
Methods inherited from interface org.apache.avalon.framework.context.Context
get
 

Method Detail

getModelFactory

public ModelFactory getModelFactory()
Return the model factory.

Returns:
the factory

getBaseDirectory

public File getBaseDirectory()
Return the base directory from which relative references should be resolved.

Returns:
the base directory

getHomeDirectory

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

Returns:
the working directory

getTempDirectory

public File getTempDirectory()
Return the temp directory from which containers may establish non-persistent content.

Returns:
the temp directory

getAnchorDirectory

public File getAnchorDirectory()
Return the anchor directory from which a container may use to resolve relative classpath references.

Returns:
the anchor directory

getRepository

public Repository getRepository()
Return the application repository from which resource directives can be resolved.

Returns:
the repository

isTraceEnabled

public boolean isTraceEnabled()
Return the system trace flag.

Returns:
the trace flag

getSPIClassLoader

public ClassLoader getSPIClassLoader()
Return the SPI classloader.

Returns:
the SPI classloader

getAPIClassLoader

public ClassLoader getAPIClassLoader()
Return the API classloader.

Returns:
the API classloader

getLoggingManager

public LoggingManager getLoggingManager()
Return the logging manager.

Returns:
the logging manager.

getLogger

public Logger getLogger()
Return the system logging channel.

Returns:
the system logging channel

getDefaultDeploymentTimeout

public long getDefaultDeploymentTimeout()
Return the default deployment phase timeout value.

Returns:
the timeout value

isCodeSecurityEnabled

public boolean isCodeSecurityEnabled()
Return the enabled status of the code security policy.

Returns:
the code security enabled status

commission

public void commission(DeploymentModel model)
                throws Exception
Request the commissioning of a runtime for a supplied deployment model.

Parameters:
model - the deployment model
Throws:
Exception - of a commissioning error occurs

decommission

public void decommission(DeploymentModel model)
Request the decommissioning of a runtime for a supplied deployment model.

Parameters:
model - the deployment model
Throws:
Exception - of a commissioning error occurs

resolve

public Object resolve(DeploymentModel model)
               throws Exception
Request resolution of an object from the runtime.

Parameters:
model - the deployment model
Throws:
Exception - if a deployment error occurs

resolve

public Object resolve(DeploymentModel model,
                      boolean proxy)
               throws Exception
Request resolution of an object from the runtime.

Parameters:
model - the deployment model
proxy - if TRUE the return value will be proxied if the underlying component typoe suppports proxy representation
Throws:
Exception - if a deployment error occurs

release

public void release(DeploymentModel model,
                    Object instance)
Request the release of an object from the runtime.

Parameters:
model - the deployment model
instance - the object to release
Throws:
Exception - if a deployment error occurs

toString

public String toString(Object object)
Prepare a string representation of an object for presentation.

Parameters:
object - the object to parse
Returns:
the presentation string

toString

public String toString(Object[] objects)
Prepare a string representation of an object array for presentation.

Parameters:
objects - the array of objects
Returns:
the presentation string


Copyright © The Apache Software Foundation. All Rights Reserved.