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 elseInstanceInstaller
to register instance in environment or somewhere elseJerseyInstaller
to register jersey related extension
Implement
Ordered
interface to support extensions ordering withOrder
annotation.Implement
WithOptions
(or extend fromInstallerOptionsSupport
) to use options in installer (seeOption
for more info).All installer are ordered according to
Order
annotation.- 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.boolean
matches(java.lang.Class<?> type)
NOTE: consider usingru.vyarus.dropwizard.guice.module.installer.util.FeatureUtils
to simplify checks (for example, types most likely must be checks to be not abstract).void
report()
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.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. UseReporter
to 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
-
-