org.apache.wicket
Interface IInitializer
- All Known Implementing Classes:
- Initializer
public interface IInitializer
Initializes something when application loads.
Initializer is there for clustering. Lets say you access a page that has a link to a resource on
node A now the url for the resource gets forwarded to node B, but node B doesn't have the
resource registered yet because maybe the page class hasn't been loaded and so its static block
hasn't run yet. So the initializer is a place for you to register all those resources and do all
the stuff you used to do in the static blocks.
You don't have to pre-register package resources
, as they can be
initialized lazily.
Initializers can be configured by having a wicket.properties file in the class path root, with
property 'initializer=${initializer class name}'. You can have one such properties per jar file,
but the initializer that property denotes can delegate to other initializers of that library.
- Author:
- Jonathan Locke
init
void init(Application application)
- Parameters:
application
- The application loading the component
destroy
void destroy(Application application)
- Parameters:
application
- The application loading the component
Copyright © 2006–2013 Apache Software Foundation. All rights reserved.