Class ContextDebugService


  • @Singleton
    public class ContextDebugService
    extends java.lang.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
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.List<java.lang.Class<?>> getGuiceManaged()  
      java.util.List<java.lang.Class<?>> getHkManaged()  
      java.util.List<java.lang.Class<?>> getManagedTypes()  
      void guiceManage​(java.lang.Class<?> type)
      Called by specific guice provision listener to check if bean is properly instantiated by guice.
      void hkManage​(java.lang.Class<?> type)
      Called by specific HK2 lifecycle listener to check if bean is properly instantiated by HK2.
      • Methods inherited from class java.lang.Object

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

      • ContextDebugService

        @Inject
        public ContextDebugService​(javax.inject.Provider<ExtensionsHolder> holder,
                                   Options options)
    • Method Detail

      • getManagedTypes

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

        public void hkManage​(java.lang.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​(java.lang.Class<?> type)
        Called by specific guice provision listener to check if bean is properly instantiated by guice.
        Parameters:
        type - instantiated bean type
      • getHkManaged

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

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