View Javadoc

1   package com.atlassian.johnson;
2   
3   import javax.annotation.Nonnull;
4   import java.util.Map;
5   
6   /**
7    * When implementing Johnson interfaces, this secondary interface can also be implemented to indicate the object needs
8    * additional initialisation.
9    * <p>
10   * This interface can be applied to implementations of:
11   * <ul>
12   * <li>{@link com.atlassian.johnson.setup.ContainerFactory ContainerFactory}</li>
13   * <li>{@link com.atlassian.johnson.event.EventCheck EventCheck} (and its derived interfaces)</li>
14   * <li>{@link com.atlassian.johnson.setup.SetupConfig SetupConfig}</li>
15   * </ul>
16   * This interface is applied by the {@link com.atlassian.johnson.config.JohnsonConfig JohnsonConfig} implementation
17   * which is being used. For exact details on its semantics, review the documentation for that class as well.
18   */
19  public interface Initable {
20  
21      /**
22       * Initialise the object, optionally drawing configuration from the provided {@code Map}. The provided map may be
23       * empty, if no parameters were configured, but it will never be {@code null}.
24       *
25       * @param params a map of additional parameters loaded from the configuration file
26       */
27      void init(@Nonnull Map<String, String> params);
28  }