public interface ModuleConfiguration
Modules have callback methods for the initialization, start and shutdown phases of the application's lifecycle.
Modifier and Type | Method and Description |
---|---|
void |
initialize(Configuration config)
Initialize the module configuration using the given global
config . |
default boolean |
isType(Class<?> type)
Checks whether this Module Configuration is of the given
type . |
default int |
phase()
Deprecated.
a
ModuleConfiguration 's phase is no longer used, as distinct phases might be necessary for
any of the start or shutdown processes added in the initialize(Configuration) method |
default void |
shutdown()
Deprecated.
in favor of maintaining shutdown operations in the
Component . Any lifecycle operations not
covered through the components created by this ModuleConfiguration should be added to the Configuration in initialize(Configuration) through LifecycleOperations.onShutdown(int,
LifecycleHandler) |
default void |
start()
Deprecated.
in favor of maintaining start operations in the
Component . Any lifecycle operations not
covered through the components created by this ModuleConfiguration should be added to the Configuration in initialize(Configuration) through LifecycleOperations.onStart(int,
LifecycleHandler) |
default ModuleConfiguration |
unwrap()
Returns the actual module configuration instance.
|
void initialize(Configuration config)
config
. Any specific start up or shut down
processes should be added here by using the provided config
and invoke LifecycleOperations.onStart(int,
LifecycleHandler)
and LifecycleOperations.onShutdown(int, LifecycleHandler)
respectively.config
- the global configuration, providing access to generic components@Deprecated default int phase()
ModuleConfiguration
's phase is no longer used, as distinct phases might be necessary for
any of the start or shutdown processes added in the initialize(Configuration)
methodinitialize(Configuration)
, start()
, shutdown()
will be invoked.@Deprecated default void start()
Component
. Any lifecycle operations not
covered through the components created by this ModuleConfiguration
should be added to the Configuration
in initialize(Configuration)
through LifecycleOperations.onStart(int,
LifecycleHandler)
Configuration.start()
@Deprecated default void shutdown()
Component
. Any lifecycle operations not
covered through the components created by this ModuleConfiguration
should be added to the Configuration
in initialize(Configuration)
through LifecycleOperations.onShutdown(int,
LifecycleHandler)
Configuration.shutdown()
default ModuleConfiguration unwrap()
Copyright © 2010–2024. All rights reserved.