public interface ContextShutdownWatcher
When the last user leaves a context and there are no objects retaining
the context to keep it open, the server shuts the context down. Any
modified state associated with the context or any of the objects contained
by it is written to persistent storage and the context and its attendent
objects become eligible for garbage collection. Prior to doing this,
however, the server first calls the noteContextShutdown()
method of
each object implementing this interface that has registered an interest by
called the context's registerContextShutdownWatcher()
method.
Instances of subclasses of Mod
that implement this interface are
automatically registered when they are attached to the context or to an
object contained by the context.
Modifier and Type | Method and Description |
---|---|
void |
noteContextShutdown()
Do whatever you want when the context shuts down.
|
void noteContextShutdown()
Whenever a context is about to be shutdown, the server will call this
method on all objects that have registered an interest in that context
via the context's registerContextShutdownWatcher()
method.
Copyright © 2017. All rights reserved.