Interface Hk2CustomBoundTypesProvider


public interface Hk2CustomBoundTypesProvider
Helper SPI to help specify Jersey HK2 custom bound types that should be HK2-injectable into CDI components.

Implementation of this type must be registered via META-INF/services mechanism. I.e. fully qualified name of an implementation class must be written into META-INF/services/org.glassfish.jersey.ext.cdi11.spi.Hk2CustomBoundTypesProvider file.

If more than one implementation is found, only a single one is selected that has the highest priority.

Author:
Jakub Podlesak
  • Method Summary

    Modifier and Type
    Method
    Description
    Provide a set of types that should became accessible by CDI container in a form of CDI beans backed by HK2.
  • Method Details

    • getHk2Types

      Set<Type> getHk2Types()
      Provide a set of types that should became accessible by CDI container in a form of CDI beans backed by HK2.

      Jersey will ask CDI container to veto these types and will register HK2 backed beans into CDI, so that @Inject marked injection points could be satisfied.

      The end user is responsible for defining necessary HK2 bindings within Jersey application. Should any of such bindings remain undefined, runtime errors are likely to occur.

      Returns:
      set of types for which HK2 backed CDI beans shall be registered.