org.apache.wicket
Interface IInitializer

All Known Implementing Classes:
DebugBarInitializer, Initializer, Initializer, Initializer, Initializer, UploadProgressBar.ComponentInitializer

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.

If an initializer also implements IDestroyer, the instance will be kept for destroying, so that it may clean up whatever it did when initializing.

Author:
Jonathan Locke

Method Summary
 void init(Application application)
           
 

Method Detail

init

void init(Application application)
Parameters:
application - The application loading the component


Copyright © 2004-2011 Apache Software Foundation. All Rights Reserved.