Class AbstractJerseyInstaller<T>

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected org.slf4j.Logger logger  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void bindInGuice​(com.google.inject.Binder binder, java.lang.Class<?> type)
      Bind to guice context.
      protected boolean isForceSingleton​(java.lang.Class<?> type, boolean hkManaged)
      Singleton binding should not be forced if bean has explicit scope declaration.
      protected boolean isJerseyExtension​(java.lang.Class<?> type)  
      protected boolean isLazy​(java.lang.Class<?> type, boolean lazy)
      Checks if lazy flag could be counted (only when extension is managed by guice).
      • Methods inherited from class java.lang.Object

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

      • logger

        protected final org.slf4j.Logger logger
    • Constructor Detail

      • AbstractJerseyInstaller

        public AbstractJerseyInstaller()
    • Method Detail

      • isLazy

        protected boolean isLazy​(java.lang.Class<?> type,
                                 boolean lazy)
        Checks if lazy flag could be counted (only when extension is managed by guice). Prints warning in case of incorrect lazy marker usage.
        Parameters:
        type - extension type
        lazy - lazy marker (annotation presence)
        Returns:
        lazy marker if guice managed type and false when hk managed.
      • isJerseyExtension

        protected boolean isJerseyExtension​(java.lang.Class<?> type)
        Parameters:
        type - extension type
        Returns:
        true if extension should be managed by hk, false to manage by guice
      • bindInGuice

        protected void bindInGuice​(com.google.inject.Binder binder,
                                   java.lang.Class<?> type)
        Bind to guice context. Singleton scope will be forced if it's not disabled ( InstallersOptions.ForceSingletonForJerseyExtensions) and if no explicit scope is declared with annotation on bean.
        Parameters:
        binder - guice binder
        type - extension type
      • isForceSingleton

        protected boolean isForceSingleton​(java.lang.Class<?> type,
                                           boolean hkManaged)
        Singleton binding should not be forced if bean has explicit scope declaration.
        Parameters:
        type - bean type
        hkManaged - true if bean is going to be managed by hk, false for guice management
        Returns:
        true to force singleton bindings for hk extensions (resources, filters etc), false otherwise