|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.avalon.framework.context.DefaultContext
org.apache.avalon.composition.model.impl.DefaultSystemContext
Implementation of a system context that exposes a system wide set of parameters.
Constructor Summary | |
DefaultSystemContext(LoggingManager logging,
File base,
File home,
File temp,
Repository repository,
String category,
boolean trace)
Creation of a new system context. |
Method Summary | |
static SystemContext |
createSystemContext(File base,
File root,
int priority)
Creation of a new system context. |
File |
getBaseDirectory()
Return the base directory from which relative classloader references may be resolved. |
ClassLoader |
getCommonClassLoader()
Return the system classloader. |
ModelFactory |
getFactory()
Return the model factory. |
File |
getHomeDirectory()
Return the working directory from which containers may establish persistent content. |
Logger |
getLogger()
Return the system logging channel. |
LoggingManager |
getLoggingManager()
Return the logging manager. |
Repository |
getRepository()
Return the system wide repository from which resource directives can be resolved. |
ClassLoader |
getSystemClassLoader()
Return the system classloader. |
File |
getTempDirectory()
Return the temporary directory from which a container may use to establish a transient content directory. |
boolean |
isTraceEnabled()
Return the system trace flag. |
void |
setTraceEnabled(boolean trace)
Set the system trace flag. |
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 |
public DefaultSystemContext(LoggingManager logging, File base, File home, File temp, Repository repository, String category, boolean trace)
logging
- the logging managerbase
- the base directory from which relative references
within a classpath or library directive shall be resolvedhome
- the home directorytemp
- the temp directoryrepository
- a resource repository to be used when resolving
resource directivestrace
- flag indicating if internal logging is enabledMethod Detail |
public static SystemContext createSystemContext(File base, File root, int priority) throws Exception
base
- the base directory from which relative references
within a classpath or library directive shall be resolvedroot
- a repository root directorypriority
- logging manager default priority
Exception
public ModelFactory getFactory()
getFactory
in interface SystemContext
public File getBaseDirectory()
getBaseDirectory
in interface SystemContext
public File getHomeDirectory()
getHomeDirectory
in interface SystemContext
public File getTempDirectory()
getTempDirectory
in interface SystemContext
public Repository getRepository()
getRepository
in interface SystemContext
public ClassLoader getCommonClassLoader()
getCommonClassLoader
in interface SystemContext
public ClassLoader getSystemClassLoader()
getSystemClassLoader
in interface SystemContext
public boolean isTraceEnabled()
isTraceEnabled
in interface SystemContext
public void setTraceEnabled(boolean trace)
trace
- the trace flagpublic LoggingManager getLoggingManager()
getLoggingManager
in interface SystemContext
public Logger getLogger()
getLogger
in interface SystemContext
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |