Class CdiServerComponentProvider

java.lang.Object
org.glassfish.jersey.ext.cdi1x.internal.CdiServerComponentProvider
All Implemented Interfaces:
ComponentProvider, ComponentProvider

public class CdiServerComponentProvider extends Object implements ComponentProvider
Implementation of ComponentProvider for Jersey Server
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    bind(Class<?> component, Set<Class<?>> providerContracts)
    Jersey will invoke this method before binding of each component class internally during initialization of it's injection manager.
    boolean
    bind(Class<?> component, ContractProvider contractProvider)
    Jersey will invoke this method before binding of each component class internally during initialization of it's injection manager.
    void
    Jersey will invoke this method after all component classes have been bound.
    void
    initialize(InjectionManager injectionManager)
    Initializes the component provider with a reference to a injection manager instance, which will get used in the application to manage individual components.

    Methods inherited from class java.lang.Object

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

    • CdiServerComponentProvider

      public CdiServerComponentProvider()
  • Method Details

    • initialize

      public void initialize(InjectionManager injectionManager)
      Description copied from interface: ComponentProvider
      Initializes the component provider with a reference to a injection manager instance, which will get used in the application to manage individual components. Providers should keep a reference to the injection manager for later use. This method will be invoked prior to any bind method calls. The injection manager parameter will not be fully initialized at the time of invocation and should be used as a reference only.
      Specified by:
      initialize in interface ComponentProvider
      Parameters:
      injectionManager - an injection manager.
    • bind

      public boolean bind(Class<?> component, Set<Class<?>> providerContracts)
      Description copied from interface: ComponentProvider
      Jersey will invoke this method before binding of each component class internally during initialization of it's injection manager. If the component provider wants to bind the component class itself, it must do so and return true. In that case, Jersey will not bind the component and rely on the component provider in this regard.
      Specified by:
      bind in interface ComponentProvider
      Parameters:
      component - a component (resource/provider) class.
      providerContracts - provider contracts implemented by given component.
      Returns:
      true if the component class has been bound by the provider, false otherwise
    • bind

      public boolean bind(Class<?> component, ContractProvider contractProvider)
      Description copied from interface: ComponentProvider
      Jersey will invoke this method before binding of each component class internally during initialization of it's injection manager. If the component provider wants to bind the component class itself, it must do so and return true. In that case, Jersey will not bind the component and rely on the component provider in this regard.
      Specified by:
      bind in interface ComponentProvider
      Parameters:
      component - a component (resource/provider) class.
      contractProvider - optional registered ContractProvider of the component.
      Returns:
      true if the component class has been bound by the provider, false otherwise
    • done

      public void done()
      Description copied from interface: ComponentProvider
      Jersey will invoke this method after all component classes have been bound. If the component provider wants to do some actions after it has seen all component classes registered with the application, this is the right place for the corresponding code.
      Specified by:
      done in interface ComponentProvider