Class DecoratedFeignComponent<T>

java.lang.Object
io.microsphere.spring.cloud.openfeign.components.DecoratedFeignComponent<T>
All Implemented Interfaces:
Refreshable
Direct Known Subclasses:
DecoratedContract, DecoratedDecoder, DecoratedEncoder, DecoratedErrorDecoder, DecoratedQueryMapEncoder, DecoratedRetryer

public abstract class DecoratedFeignComponent<T> extends Object implements Refreshable
Since:
0.0.1
Author:
韩超, Mercy
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected T
     
    protected final io.microsphere.logging.Logger
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    DecoratedFeignComponent(String contextId, org.springframework.cloud.context.named.NamedContextFactory<org.springframework.cloud.openfeign.FeignClientSpecification> contextFactory, org.springframework.cloud.openfeign.FeignClientProperties clientProperties, T delegate)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected abstract Class<? extends T>
     
     
     
    boolean
     
    protected <T> T
    get(Function<org.springframework.cloud.openfeign.FeignClientProperties.FeignClientConfiguration,T> configurationFunction)
     
    org.springframework.cloud.openfeign.FeignClientProperties.FeignClientConfiguration
     
    org.springframework.cloud.openfeign.FeignClientProperties.FeignClientConfiguration
     
    int
     
    static <W extends DecoratedFeignComponent<T>, T>
    W
    instantiate(Class<W> decoratedClass, Class<? extends T> componentClass, String contextId, org.springframework.cloud.context.named.NamedContextFactory<org.springframework.cloud.openfeign.FeignClientSpecification> contextFactory, org.springframework.cloud.openfeign.FeignClientProperties clientProperties, T delegate)
     
    protected T
     
    <T> T
    loadInstanceFromContextFactory(String contextId, Class<T> componentType)
     
    void
    Refresh
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • logger

      protected final io.microsphere.logging.Logger logger
    • delegate

      protected volatile T delegate
  • Constructor Details

    • DecoratedFeignComponent

      public DecoratedFeignComponent(String contextId, org.springframework.cloud.context.named.NamedContextFactory<org.springframework.cloud.openfeign.FeignClientSpecification> contextFactory, org.springframework.cloud.openfeign.FeignClientProperties clientProperties, T delegate)
  • Method Details

    • delegate

      public T delegate()
    • loadInstanceFromContextFactory

      @NonNull public <T> T loadInstanceFromContextFactory(String contextId, Class<T> componentType)
    • contextId

      @NonNull public String contextId()
    • refresh

      public void refresh()
      Description copied from interface: Refreshable
      Refresh
      Specified by:
      refresh in interface Refreshable
    • componentType

      protected abstract Class<? extends T> componentType()
    • getDefaultConfiguration

      public org.springframework.cloud.openfeign.FeignClientProperties.FeignClientConfiguration getDefaultConfiguration()
    • getCurrentConfiguration

      public org.springframework.cloud.openfeign.FeignClientProperties.FeignClientConfiguration getCurrentConfiguration()
    • get

      protected <T> T get(Function<org.springframework.cloud.openfeign.FeignClientProperties.FeignClientConfiguration,T> configurationFunction)
    • loadInstance

      protected T loadInstance()
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • instantiate

      public static <W extends DecoratedFeignComponent<T>, T> W instantiate(Class<W> decoratedClass, Class<? extends T> componentClass, String contextId, org.springframework.cloud.context.named.NamedContextFactory<org.springframework.cloud.openfeign.FeignClientSpecification> contextFactory, org.springframework.cloud.openfeign.FeignClientProperties clientProperties, T delegate)