Interface FeatureInstaller
-
- All Known Implementing Classes:
AbstractJerseyInstaller,EagerSingletonInstaller,HealthCheckInstaller,JerseyFeatureInstaller,JerseyProviderInstaller,LifeCycleInstaller,ManagedInstaller,PluginInstaller,ResourceInstaller,TaskInstaller,WebFilterInstaller,WebListenerInstaller,WebServletInstaller
public interface FeatureInstallerInstaller 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:BindingInstallerto apply specific guice bindings (called in process of injector creation, whereas other installer are called after)TypeInstallerto register class in environment or somewhere elseInstanceInstallerto register instance in environment or somewhere elseJerseyInstallerto register jersey related extension
Implement
Orderedinterface to support extensions ordering withOrderannotation.Implement
WithOptions(or extend fromInstallerOptionsSupport) to use options in installer (seeOptionfor more info).All installer are ordered according to
Orderannotation.- Since:
- 31.08.2014
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default java.util.List<java.lang.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.booleanmatches(java.lang.Class<?> type)NOTE: consider usingru.vyarus.dropwizard.guice.module.installer.util.FeatureUtilsto simplify checks (for example, types most likely must be checks to be not abstract).voidreport()Called to log registered endpoints in dropwizard log fashion.
-
-
-
Method Detail
-
matches
boolean matches(java.lang.Class<?> type)
NOTE: consider usingru.vyarus.dropwizard.guice.module.installer.util.FeatureUtilsto 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. UseReporterto simplify reporting.Method may do nothing if reporting not required
-
getRecognizableSigns
default java.util.List<java.lang.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
-
-