Class ServiceLoaderBundleLookup
- java.lang.Object
-
- ru.vyarus.dropwizard.guice.bundle.lookup.ServiceLoaderBundleLookup
-
- All Implemented Interfaces:
GuiceyBundleLookup
public class ServiceLoaderBundleLookup extends java.lang.Object implements GuiceyBundleLookup
Load bundles usingServiceLoader
byGuiceyBundle
. 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 Summary
Constructors Constructor Description ServiceLoaderBundleLookup()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<GuiceyBundle>
lookup()
Called before guice injector creation to lookup additional bundles (in dropwizard run phase).
-
-
-
Method Detail
-
lookup
public java.util.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 interfaceGuiceyBundleLookup
- Returns:
- list of found bundles or empty list
-
-