public class JerseyFeatureInstaller extends java.lang.Object implements FeatureInstaller<javax.ws.rs.core.Feature>, InstanceInstaller<javax.ws.rs.core.Feature>
Feature. Directly register instance in jersey context.
Installer is useful when guice-managed component required for configuration.
| Constructor and Description |
|---|
JerseyFeatureInstaller() |
| Modifier and Type | Method and Description |
|---|---|
void |
install(io.dropwizard.setup.Environment environment,
javax.ws.rs.core.Feature instance)
Use
FeatureUtils.getInstanceClass(instance) to overcome proxies and get correct type. |
boolean |
matches(java.lang.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 |
report()
Called to log registered endpoints in dropwizard log fashion.
|
public boolean matches(java.lang.Class<?> type)
FeatureInstallerru.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.
matches in interface FeatureInstaller<javax.ws.rs.core.Feature>type - type to checkpublic void report()
FeatureInstallerReporter to simplify reporting.
Method may do nothing if reporting not required
report in interface FeatureInstaller<javax.ws.rs.core.Feature>public void install(io.dropwizard.setup.Environment environment,
javax.ws.rs.core.Feature instance)
InstanceInstallerFeatureUtils.getInstanceClass(instance) to overcome proxies and get correct type.install in interface InstanceInstaller<javax.ws.rs.core.Feature>environment - environment objectinstance - extension instance