@FunctionalInterface public interface OneTimeInitializerPredicate
runOnce() returning true means that
ServletContainerInitializers are executed only once and the
implementation doesn't have to care about cleaning up data collected based on
previous call.
In some cases (e.g. OSGi) the
ServletContainerInitializer.onStartup(java.util.Set, javax.servlet.ServletContext)
method may be called several times for the application (with different
classes provided). In this case the initializer logic should reset the data
passed on the previous call and set the new data. To be able to reset the
data correctly the ServletContainerInitializer implementation may
need to store additional data between calls which is excessive if the
ServletContainerInitializer.onStartup(java.util.Set, javax.servlet.ServletContext)
is executed only once.
| Modifier and Type | Method and Description |
|---|---|
boolean |
runOnce()
Checks whether the
ServletContainerInitializers requires reset to
the previous state on
ServletContainerInitializer.onStartup(java.util.Set, javax.servlet.ServletContext)
call. |
boolean runOnce()
ServletContainerInitializers requires reset to
the previous state on
ServletContainerInitializer.onStartup(java.util.Set, javax.servlet.ServletContext)
call.true if ServletContainerInitializers are executed
only once, false otherwiseCopyright © 2021. All rights reserved.