Class GuiceInstanceListener

  • All Implemented Interfaces:
    com.google.inject.spi.ProvisionListener

    public class GuiceInstanceListener
    extends java.lang.Object
    implements com.google.inject.spi.ProvisionListener
    Listens guice for created services and checks correctness for services registered by JerseyInstaller based installers.

    Some services will be registered before debug service gets injected into listener instance, so before this listener simply collects all created objects to check after.

    Since:
    15.01.2016
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.google.inject.spi.ProvisionListener

        com.google.inject.spi.ProvisionListener.ProvisionInvocation<T extends java.lang.Object>
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      <T> void onProvision​(com.google.inject.spi.ProvisionListener.ProvisionInvocation<T> provision)  
      void setContextDebugService​(ContextDebugService contextDebugService)
      Inject debug service.
      • Methods inherited from class java.lang.Object

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

      • GuiceInstanceListener

        public GuiceInstanceListener()
    • Method Detail

      • onProvision

        public <T> void onProvision​(com.google.inject.spi.ProvisionListener.ProvisionInvocation<T> provision)
        Specified by:
        onProvision in interface com.google.inject.spi.ProvisionListener
      • setContextDebugService

        @Inject
        public void setContextDebugService​(ContextDebugService contextDebugService)
        Inject debug service.
        Parameters:
        contextDebugService - debug service