|
|||||||||||
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.
Method Summary | |
Runtime |
buildRuntimeInstance(InitialContext context,
Class clazz,
Artifact lifestyle)
Build a runtime using a supplied class. |
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 classloader references may be resolved. |
long |
getDefaultDeploymentTimeout()
Return the default deployment phase timeout value. |
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. |
ModelFactory |
getModelFactory()
Return the model factory. |
Repository |
getRepository()
Return the system wide repository from which resource directives can be resolved. |
ClassLoader |
getSPIClassLoader()
Return the SPI classloader. |
File |
getTempDirectory()
Return the temporary directory from which a container may use to establish a transient content directory. |
boolean |
isCodeSecurityEnabled()
Return the enabled status of the code security policy. |
boolean |
isTraceEnabled()
Return the system trace flag. |
String |
processString(String name)
Prepare a string representation of an object for presentation. |
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. |
void |
setTraceEnabled(boolean trace)
Set the system trace flag. |
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 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 |
Method Detail |
public boolean isCodeSecurityEnabled()
isCodeSecurityEnabled
in interface SystemContext
public ModelFactory getModelFactory()
getModelFactory
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 File getAnchorDirectory()
getAnchorDirectory
in interface SystemContext
public Repository getRepository()
getRepository
in interface SystemContext
public ClassLoader getAPIClassLoader()
getAPIClassLoader
in interface SystemContext
public ClassLoader getSPIClassLoader()
getSPIClassLoader
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
public long getDefaultDeploymentTimeout()
getDefaultDeploymentTimeout
in interface SystemContext
public void commission(DeploymentModel model) throws Exception
commission
in interface SystemContext
model
- the deployment model
Exception
- of a commissioning error occurspublic void decommission(DeploymentModel model)
decommission
in interface SystemContext
model
- the deployment model
Exception
- of a commissioning error occurspublic Object resolve(DeploymentModel model) throws Exception
resolve
in interface SystemContext
model
- the deployment model
Exception
- if a deployment error occurspublic Object resolve(DeploymentModel model, boolean proxy) throws Exception
resolve
in interface SystemContext
model
- the deployment modelproxy
- if TRUE the return value will be proxied if the
underlying component typoe suppports proxy representation
Exception
- if a deployment error occurspublic void release(DeploymentModel model, Object instance)
release
in interface SystemContext
model
- the deployment modelinstance
- the object to release
Exception
- if a deployment error occurspublic String toString(Object object)
toString
in interface SystemContext
object
- the object to parse
public String processString(String name)
name
- the value to parse
public String toString(Object[] objects)
toString
in interface SystemContext
objects
- the array of objects
public Runtime buildRuntimeInstance(InitialContext context, Class clazz, Artifact lifestyle) throws SystemException
context
- the initial context from which to bootstrap the runtimeclazz
- the runtime factory classlifestyle
- the artifact referencing the lifestyle factory
SystemException
- if the class does not expose a public
constructor, or the constructor requires arguments that the
builder cannot resolve, or if a unexpected instantiation error
ooccurs
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |