|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--net.larsan.urd.impl.Standalone
The standalone is a Urd server which prepares the environment before starting. It asumes that class loading is taken care of and if it have not been explicitly told otherwise it will use it's own class loader as the parent class loader for subservices.
Immediate startup information needed by this standalone can be garthered
in a CmdOptions object.
This server prepares the JNDI context for later use. It reservers the subcontext
'urd' which is one of the prerequisites inherited from the UrdServer. In preparation
it binds the following objects in the context:
/urd/root (installation root, file object)
/urd/config (configuration file object)
/urd/handler (current error handler)
/urd/classloader/system (system framework class loader)
/urd/classloader/service (service root classloader)
/urd/classloader/shared (shared services class loader)
/urd/threads (the framework thread pool)
When the above objects have sucessfully started the server will be startable. The proper
invocation chain for this standalone is:
prepare -> start (-> destroy)
Server shutdown is handled by the base server. Destruction will be called when the
UrdServer shuts down.
This class is not thread safe.
| Constructor Summary | |
Standalone()
|
|
Standalone(CmdOptions options)
|
|
Standalone(CmdOptions options,
java.lang.ClassLoader serviceLoader)
|
|
| Method Summary | |
void |
destroy()
Clean up all available resources. |
void |
prepare()
Prepare the server before a startup. |
void |
serverStarted()
Urd server has started, this does not interest us. |
void |
serverStopped()
Urd server has stopped, close and destroy |
void |
start()
Start the execution of this server. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Standalone(CmdOptions options,
java.lang.ClassLoader serviceLoader)
throws java.io.IOException
public Standalone(CmdOptions options)
throws java.io.IOException
public Standalone()
throws java.io.IOException
| Method Detail |
public void prepare()
throws java.io.IOException,
ConfigurationException,
javax.naming.NamingException
destroy is made after server execution to clean up
resources.
java.io.IOException - On read I/O errors
ConfigurationException - On configuration errors
javax.naming.NamingException - On fatal JNDI errorspublic void start()
UrdServer and this method will return immediately.
Should prepared not have been called before this
method is invoked an IllegalStateException will be thrown.
java.lang.IllegalStateException - If the server is not readypublic void destroy()
Should prepared not have been called before this
method is invoked an IllegalStateException will be thrown.
public void serverStarted()
serverStarted in interface UrdServerListenerpublic void serverStopped()
serverStopped in interface UrdServerListener
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||