Class ServiceLoaderBundleLookup

java.lang.Object
ru.vyarus.dropwizard.guice.bundle.lookup.ServiceLoaderBundleLookup
All Implemented Interfaces:
GuiceyBundleLookup

public class ServiceLoaderBundleLookup extends Object implements GuiceyBundleLookup
Load bundles using ServiceLoader by GuiceyBundle. Intended to be used for automatic installation of third party extensions.

Extension jar must contain file: META-INF/services/ru.vyarus.dropwizard.guice.module.installer.bundle.GuiceyBundle. File must contain one or more implementation classes (per line): com.foo.MyGuiceyBundle. Each bundle must have default no-args constructor.

Since:
18.01.2016
  • Constructor Details

    • ServiceLoaderBundleLookup

      public ServiceLoaderBundleLookup()
  • Method Details

    • lookup

      public List<GuiceyBundle> lookup()
      Description copied from interface: GuiceyBundleLookup
      Called before guice injector creation to lookup additional bundles (in dropwizard run phase).
      Specified by:
      lookup in interface GuiceyBundleLookup
      Returns:
      list of found bundles or empty list