Class JerseyFeatureInstaller

  • All Implemented Interfaces:
    FeatureInstaller, InstanceInstaller<javax.ws.rs.core.Feature>

    public class JerseyFeatureInstaller
    extends java.lang.Object
    implements FeatureInstaller, InstanceInstaller<javax.ws.rs.core.Feature>
    Jersey feature installer. Search classes implementing Feature. Directly register instance in jersey context.

    Installer is useful when guice-managed component required for configuration.

    Since:
    13.01.2016
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JerseyFeatureInstaller

        public JerseyFeatureInstaller()
    • Method Detail

      • matches

        public boolean matches​(java.lang.Class<?> type)
        Description copied from interface: FeatureInstaller
        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).

        When type accepted by any extension it's registered in guice module.

        Specified by:
        matches in interface FeatureInstaller
        Parameters:
        type - type to check
        Returns:
        true if extension recognized, false otherwise
      • report

        public void report()
        Description copied from interface: FeatureInstaller
        Called to log registered endpoints in dropwizard log fashion. It's important to naturally show all dynamically resolved classes to easily catch errors. Use Reporter to simplify reporting.

        Method may do nothing if reporting not required

        Specified by:
        report in interface FeatureInstaller