Interface FeatureInstaller

All Known Implementing Classes:
AbstractJerseyInstaller, EagerSingletonInstaller, HealthCheckInstaller, JerseyFeatureInstaller, JerseyProviderInstaller, LifeCycleInstaller, ManagedInstaller, PluginInstaller, ResourceInstaller, TaskInstaller, WebFilterInstaller, WebListenerInstaller, WebServletInstaller

public interface FeatureInstaller
Installer serve two purposes: find extension on classpath and properly install it (in dropwizard or somewhere else). Each installer should work with single feature.

Installers are not guice beans: they are instantiated during guice context start and used to register additional beans in guice context.

Installer may use one or more types of installation:
  • BindingInstaller to apply specific guice bindings (called in process of injector creation, whereas other installer are called after)
  • TypeInstaller to register class in environment or somewhere else
  • InstanceInstaller to register instance in environment or somewhere else
  • JerseyInstaller to register jersey related extension
If installer will not implement any of this installation types then recognized extension will only be registered in guice context (default binding).

Implement Ordered interface to support extensions ordering with Order annotation.

Implement WithOptions (or extend from InstallerOptionsSupport) to use options in installer (see Option for more info).

All installer are ordered according to Order annotation.

Since:
31.08.2014
  • Method Summary

    Modifier and Type
    Method
    Description
    default List<String>
    Method used by extensions help report (GuiceBundle.Builder.printExtensionsHelp()) to show what signs this exact installer recognize so user could better understand extensions support specifics.
    boolean
    matches(Class<?> type)
    NOTE: consider using ru.vyarus.dropwizard.guice.module.installer.util.FeatureUtils to simplify checks (for example, types most likely must be checks to be not abstract).
    void
    Called to log registered endpoints in dropwizard log fashion.
  • Method Details

    • matches

      boolean matches(Class<?> type)
      NOTE: consider using ru.vyarus.dropwizard.guice.module.installer.util.FeatureUtils to simplify checks (for example, types most likely must be checks to be not abstract).

      When type accepted by any extension it's registered in guice module.

      Parameters:
      type - type to check
      Returns:
      true if extension recognized, false otherwise
    • report

      void report()
      Called to log registered endpoints in dropwizard log fashion. It's important to naturally show all dynamically resolved classes to easily catch errors. Use Reporter to simplify reporting.

      Method may do nothing if reporting not required

    • getRecognizableSigns

      default List<String> getRecognizableSigns()
      Method used by extensions help report (GuiceBundle.Builder.printExtensionsHelp()) to show what signs this exact installer recognize so user could better understand extensions support specifics.
      Returns:
      list of extension signs installer recognize