Package feign.hystrix

Class FallbackFactory.Default<T>

  • All Implemented Interfaces:
    FallbackFactory<T>
    Enclosing interface:
    FallbackFactory<T>

    public static final class FallbackFactory.Default<T>
    extends java.lang.Object
    implements FallbackFactory<T>
    Returns a constant fallback after logging the cause to FINE level.
    • Constructor Summary

      Constructors 
      Constructor Description
      Default​(T constant)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      T create​(java.lang.Throwable cause)
      Returns an instance of the fallback appropriate for the given cause
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

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

      • Default

        public Default​(T constant)
    • Method Detail

      • create

        public T create​(java.lang.Throwable cause)
        Description copied from interface: FallbackFactory
        Returns an instance of the fallback appropriate for the given cause
        Specified by:
        create in interface FallbackFactory<T>
        Parameters:
        cause - corresponds to AbstractCommand.getExecutionException() often, but not always an instance of FeignException.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object