public interface Application
This interface defines the API of the singleton Application that runs in a jDISC instance. An Application instance
will always have its destroy()
method called, regardless of whether start()
or stop()
threw any exceptions.
Modifier and Type | Method and Description |
---|---|
void |
destroy()
This method is called by the
ApplicationLoader after first calling stop() , and all previous
DeactivatedContainer s have terminated. |
void |
start()
This method is called by the
ApplicationLoader just after creating this Application instance. |
void |
stop()
This method is called by the
ApplicationLoader after the corresponding signal has been issued by the
controlling start script. |
void start()
This method is called by the ApplicationLoader
just after creating this Application instance. Use this
method to start the Application's worker thread, and to activate a Container
. If you attempt to call
ContainerActivator.activateContainer(ContainerBuilder)
before this method is invoked, that call will
throw an ApplicationNotReadyException
. If this method does not throw an exception, the stop()
method will be called at some time in the future.
void stop()
This method is called by the ApplicationLoader
after the corresponding signal has been issued by the
controlling start script. Once this method returns, all calls to ContainerActivator.activateContainer(ContainerBuilder)
will throw ApplicationNotReadyException
s. Use
this method to prepare for termination (see destroy()
).
void destroy()
This method is called by the ApplicationLoader
after first calling stop()
, and all previous
DeactivatedContainer
s have terminated. Use this method to shut down all Application components such as
ClientProvider
s and ServerProvider
s.
Copyright © 2017. All rights reserved.