Package com.yahoo.jdisc.application
Interface Application
- All Known Subinterfaces:
ClientApplication
- All Known Implementing Classes:
AbstractApplication
,AbstractClientApplication
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.- Author:
- Simon Thoresen Hult
-
Method Summary
Modifier and TypeMethodDescriptionvoid
destroy()
This method is called by theApplicationLoader
after first callingstop()
, and all previousDeactivatedContainer
s have terminated.void
start()
This method is called by theApplicationLoader
just after creating this Application instance.void
stop()
This method is called by theApplicationLoader
after the corresponding signal has been issued by the controlling start script.
-
Method Details
-
start
void start()This method is called by theApplicationLoader
just after creating this Application instance. Use this method to start the Application's worker thread, and to activate aContainer
. If you attempt to callContainerActivator.activateContainer(ContainerBuilder)
before this method is invoked, that call will throw anApplicationNotReadyException
. If this method does not throw an exception, thestop()
method will be called at some time in the future. -
stop
void stop()This method is called by theApplicationLoader
after the corresponding signal has been issued by the controlling start script. Once this method returns, all calls toContainerActivator.activateContainer(ContainerBuilder)
will throwApplicationNotReadyException
s. Use this method to prepare for termination (seedestroy()
). -
destroy
void destroy()This method is called by theApplicationLoader
after first callingstop()
, and all previousDeactivatedContainer
s have terminated. Use this method to shut down all Application components such asClientProvider
s andServerProvider
s.
-