Class ContextDebugService

java.lang.Object
ru.vyarus.dropwizard.guice.module.jersey.debug.service.ContextDebugService

@Singleton public class ContextDebugService extends Object
Debug service checks and collect information on jersey (and HK2) related types instantiation. Actual bean instantiation detection by guice or HK2 is performed by specific listeners. Service only checks correctness and tracks instantiated objects.

Only objects installed by JerseyInstaller installers are tracked.

Since:
15.01.2016
  • Constructor Details

    • ContextDebugService

      @Inject public ContextDebugService(jakarta.inject.Provider<ExtensionsHolder> holder, Options options)
      Create jersey debug service.
      Parameters:
      holder - extensions holder
      options - options
  • Method Details

    • getManagedTypes

      public List<Class<?>> getManagedTypes()
      Returns:
      list of all types that must be tracked
    • hkManage

      public void hkManage(Class<?> type)
      Called by specific HK2 lifecycle listener to check if bean is properly instantiated by HK2.
      Parameters:
      type - instantiated bean type
    • guiceManage

      public void guiceManage(Class<?> type)
      Called by specific guice provision listener to check if bean is properly instantiated by guice.
      Parameters:
      type - instantiated bean type
    • getHkManaged

      public List<Class<?>> getHkManaged()
      Returns:
      classes of all tracked beans instantiated by HK2 (so far)
    • getGuiceManaged

      public List<Class<?>> getGuiceManaged()
      Returns:
      classes of all tracked beans instantiated by guice (so far)