public interface DeactivatedContainer
This interface represents a Container
which has been deactivated. An instance of this class is returned by
the ContainerActivator.activateContainer(ContainerBuilder)
method, and is used to schedule a cleanup task
that is executed once the the deactivated Container has terminated.
Modifier and Type | Method and Description |
---|---|
Object |
appContext()
Returns the context object that was previously attached to the corresponding
ContainerBuilder through
the ContainerBuilder.setAppContext(Object) method. |
void |
notifyTermination(Runnable task)
Schedules the given
Runnable to execute once this DeactivatedContainer has terminated. |
Object appContext()
Returns the context object that was previously attached to the corresponding ContainerBuilder
through
the ContainerBuilder.setAppContext(Object)
method. This is useful for tracking Application
specific resources that are to be tracked alongside a Container
.
void notifyTermination(Runnable task)
Schedules the given Runnable
to execute once this DeactivatedContainer has terminated. A
DeactivatedContainer is considered to have terminated once there are no more Request
s, Response
s
or corresponding ContentChannel
s being processed by components that belong to it.
If termination has already occured, this method immediately runs the given Runnable in the current thread.
task
- The task to run once this DeactivatedContainer has terminated.Copyright © 2017. All rights reserved.