Class FeignContext

java.lang.Object
org.springframework.cloud.context.named.NamedContextFactory<FeignClientSpecification>
org.springframework.cloud.openfeign.FeignContext
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.DisposableBean, org.springframework.context.ApplicationContextAware

public class FeignContext extends org.springframework.cloud.context.named.NamedContextFactory<FeignClientSpecification>
A factory that creates instances of feign classes. It creates a Spring ApplicationContext per client name, and extracts the beans that it needs from there.
Author:
Spencer Gibb, Dave Syer, Matt King, Jasbir Singh
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.springframework.cloud.context.named.NamedContextFactory

    org.springframework.cloud.context.named.NamedContextFactory.Specification
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    <T> T
    getInstance(String contextName, String beanName, Class<T> type)
     
    <T> Map<String,T>
     
    <T> T
     

    Methods inherited from class org.springframework.cloud.context.named.NamedContextFactory

    createContext, destroy, generateDisplayName, getContext, getContextNames, getInstance, getInstance, getInstance, getInstances, getLazyProvider, getParent, getProvider, setApplicationContext, setConfigurations

    Methods inherited from class java.lang.Object

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

    • FeignContext

      public FeignContext()
  • Method Details

    • getInstanceWithoutAncestors

      @Nullable public <T> T getInstanceWithoutAncestors(String name, Class<T> type)
    • getInstancesWithoutAncestors

      @Nullable public <T> Map<String,T> getInstancesWithoutAncestors(String name, Class<T> type)
    • getInstance

      public <T> T getInstance(String contextName, String beanName, Class<T> type)