|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--AbstractLogEnabled | +--org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor
This is the object that is interacted with to create, manage and dispose of the kernel and related resources.
Field Summary |
Fields inherited from interface org.apache.avalon.phoenix.interfaces.Embeddor |
ROLE |
Fields inherited from interface org.apache.avalon.phoenix.interfaces.EmbeddorMBean |
ROLE |
Constructor Summary | |
DefaultEmbeddor()
|
Method Summary | |
void |
configure(Configuration configuration)
|
void |
contextualize(Context context)
Pass the Context to the embeddor. |
protected void |
deployDefaultApplications()
The deployer is used to load the applications from the default-apps-location specified in Parameters. |
protected void |
deployFile(String name,
File file)
|
void |
dispose()
Release all the resources associated with kernel. |
void |
execute()
This is the main method of the embeddor. |
String |
getBuild()
Get a string defining the build. |
String |
getHomeDirectory()
Get location of Phoenix installation |
protected Kernel |
getKernel()
Allow subclasses to get access to kernel. |
String |
getName()
Get name by which the server is know. |
protected Parameters |
getParameters()
Allow subclasses to get access to parameters. |
Date |
getStartTime()
Get the date at which this server started. |
long |
getUpTimeInMillis()
Retrieve the number of millisecond the server has been up. |
String |
getVersion()
Retrieve a string identifying version of server. |
void |
initialize()
Creates the core handlers - logger, deployer, Manager and Kernel. |
void |
parameterize(Parameters parameters)
Set parameters for this component. |
void |
restart()
Ask the embeddor to restart itself if this operation is supported. |
void |
shutdown()
Request the Embeddor shutsdown. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DefaultEmbeddor()
Method Detail |
public void contextualize(Context context) throws ContextException
context
-
ContextException
public void parameterize(Parameters parameters) throws ParameterException
ConfigurationRepository
with your own repository you
would pass in a parameter such as;
org.apache.avalon.phoenix.interfaces.ConfigurationRepository = com.biz.MyCustomConfigurationRepository
Of the other type of parameters, the following are supported by the DefaultEmbeddor implementation of Embeddor. Note that some of the embedded components may support other parameters.
parameters
- the Parameters for embeddor
ParameterException
- if an error occurspublic void configure(Configuration configuration) throws ConfigurationException
ConfigurationException
public void initialize() throws Exception
run()
method.
Exception
public void execute() throws Exception
Facilities
. These
are registered with the Kernel and the Manager. The same
happens for the Applications
.
Now, the Kernel is taken through its lifecycle. When it is
finished, as well as all the applications running in it, it
is shut down, after which the PhoenixEmbeddor is as well.
Exception
public void dispose()
public void shutdown()
shutdown
in interface Embeddor
public void restart() throws UnsupportedOperationException
restart
in interface EmbeddorMBean
UnsupportedOperationException
- if restart not supportedpublic String getName()
getName
in interface EmbeddorMBean
public String getHomeDirectory()
getHomeDirectory
in interface EmbeddorMBean
public Date getStartTime()
getStartTime
in interface EmbeddorMBean
public long getUpTimeInMillis()
getUpTimeInMillis
in interface EmbeddorMBean
public String getVersion()
getVersion
in interface EmbeddorMBean
public String getBuild()
getBuild
in interface EmbeddorMBean
protected void deployDefaultApplications() throws Exception
Exception
- if an error occursprotected final void deployFile(String name, File file) throws Exception
Exception
protected final Kernel getKernel()
protected final Parameters getParameters()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |