Trait

com.twitter.finatra.httpclient.modules

HttpClientModuleTrait

Related Doc: package modules

Permalink

trait HttpClientModuleTrait extends TwitterModule with StackClientModuleTrait[Request, Response, Client]

Extending this trait allows for configuring an com.twitter.finagle.Http.Client and/or a com.twitter.finatra.httpclient.HttpClient.

Example:
  1. class MyHttpClientModule
      extends HttpClientModuleTrait {
      override def dest: String = "/s/my/service"
      override def label: String = "myservice"
      override protected def sessionAcquisitionTimeout: Duration = 1.seconds
      override protected def requestTimeout: Duration = 5.seconds
      override protected def retryBudget: RetryBudget = RetryBudget(15.seconds, 5, .1)
      // if you want to customize the client configuration
      // you can:
      //
      // override def configureClient(
      //  injector: Injector,
      //  client: Http.Client
      // ): Http.Client =
      //   client.
      //     withTracer(NullTracer)
      //     withStatsReceiver(NullStatsReceiver)
      //
      // You can configure TLS on the client directly
      //
      // override def configureClient(
      //  injector: Injector,
      //  client: Http.Client
      // ): Http.Client = client.withTls("yourSslHostName")
      //
      // depending on your client type, you may want to provide a global instance,
      // otherwise you might want to specify how your consumers can provide a binding
      // for an instance to the client
      //
      // ex:
      // @Provides
      // @Singleton
      // final def provideFinagleClient(
      //   injector: Injector,
      //   statsReceiver: StatsReceiver
      // ): Http.Client = newClient(injector, statsReceiver)
      //
      // Or create a service directly
      //
      // ex:
      // @Provides
      // @Singleton
      // final def provideMyService(
      //   injector: Injector,
      //   statsReceiver: StatsReceiver
      // ): Service[Request, Response] =
      //     myCoolFilter.andThen(newService(injector, statsReceiver))
      //
      // Or provide the `com.twitter.finatra.httpclient.HttpClient`
      //
      // ex:
      // @Provides
      // @Singleton
      // final def provideMyHttpClient(
      //   injector: Injector,
      //   statsReceiver: StatsReceiver,
      //   mapper: ScalaObjectMapper
      // ): HttpClient = newHttpClient(injector, statsReceiver, mapper)
    }
Note

This trait does not define any @Provide annotations or bindings.

Linear Supertypes
StackClientModuleTrait[Request, Response, Client], TwitterModule, TwitterBaseModule, TwitterModuleLifecycle, Logging, Logging, TwitterModuleFlags, AbstractModule, Module, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. HttpClientModuleTrait
  2. StackClientModuleTrait
  3. TwitterModule
  4. TwitterBaseModule
  5. TwitterModuleLifecycle
  6. Logging
  7. Logging
  8. TwitterModuleFlags
  9. AbstractModule
  10. Module
  11. AnyRef
  12. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def dest: String

    Permalink
    Definition Classes
    StackClientModuleTrait
  2. abstract def label: String

    Permalink
    Definition Classes
    StackClientModuleTrait

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def addError(arg0: Message): Unit

    Permalink
    Attributes
    protected[com.google.inject]
    Definition Classes
    AbstractModule
  5. def addError(arg0: Throwable): Unit

    Permalink
    Attributes
    protected[com.google.inject]
    Definition Classes
    AbstractModule
  6. def addError(arg0: String, arg1: <repeated...>[AnyRef]): Unit

    Permalink
    Attributes
    protected[com.google.inject]
    Definition Classes
    AbstractModule
  7. def addFlagConverter[T <: AnyRef](typeMatcher: Matcher[_ >: TypeLiteral[_]], F: Flaggable[T]): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    TwitterModule
  8. def addFlagConverter[T <: AnyRef](implicit arg0: Manifest[T], F: Flaggable[T]): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    TwitterModule
  9. def addTypeConverter[T](converter: TypeConverter)(implicit arg0: Manifest[T]): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    TwitterModule
  10. def asClosable(client: Client): Closable

    Permalink
    Attributes
    protected
    Definition Classes
    StackClientModuleTrait
  11. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  12. final def baseClient: Client

    Permalink
    Attributes
    protected
    Definition Classes
    HttpClientModuleTrait → StackClientModuleTrait
  13. def bind[T](annotation: Annotation)(implicit arg0: Manifest[T]): ScalaAnnotatedBindingBuilder[T]

    Permalink
    Attributes
    protected
    Definition Classes
    TwitterModule
  14. def bind[T, A <: Annotation](implicit arg0: Manifest[T], arg1: Manifest[A]): ScalaAnnotatedBindingBuilder[T]

    Permalink
    Attributes
    protected
    Definition Classes
    TwitterModule
  15. def bind[T](implicit arg0: Manifest[T]): ScalaAnnotatedBindingBuilder[T]

    Permalink
    Attributes
    protected
    Definition Classes
    TwitterModule
  16. def bind[T](arg0: Class[T]): AnnotatedBindingBuilder[T]

    Permalink
    Attributes
    protected[com.google.inject]
    Definition Classes
    AbstractModule
  17. def bind[T](arg0: TypeLiteral[T]): AnnotatedBindingBuilder[T]

    Permalink
    Attributes
    protected[com.google.inject]
    Definition Classes
    AbstractModule
  18. def bind[T](arg0: Key[T]): LinkedBindingBuilder[T]

    Permalink
    Attributes
    protected[com.google.inject]
    Definition Classes
    AbstractModule
  19. def bindAssistedFactory[T]()(implicit arg0: Manifest[T]): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    TwitterModule
  20. def bindConstant(): AnnotatedConstantBindingBuilder

    Permalink
    Attributes
    protected[com.google.inject]
    Definition Classes
    AbstractModule
  21. def bindInterceptor(arg0: Matcher[_ >: Class[_]], arg1: Matcher[_ >: Method], arg2: <repeated...>[MethodInterceptor]): Unit

    Permalink
    Attributes
    protected[com.google.inject]
    Definition Classes
    AbstractModule
  22. def bindListener(arg0: Matcher[_ >: Binding[_]], arg1: <repeated...>[ProvisionListener]): Unit

    Permalink
    Attributes
    protected[com.google.inject]
    Definition Classes
    AbstractModule
  23. def bindListener(arg0: Matcher[_ >: TypeLiteral[_]], arg1: TypeListener): Unit

    Permalink
    Attributes
    protected[com.google.inject]
    Definition Classes
    AbstractModule
  24. def bindMultiple[T](annotation: Annotation)(implicit arg0: Manifest[T]): ScalaMultibinder[T]

    Permalink
    Attributes
    protected
    Definition Classes
    TwitterModule
  25. def bindMultiple[T, A <: Annotation](implicit arg0: Manifest[T], arg1: Manifest[A]): ScalaMultibinder[T]

    Permalink
    Attributes
    protected
    Definition Classes
    TwitterModule
  26. def bindMultiple[T](implicit arg0: Manifest[T]): ScalaMultibinder[T]

    Permalink
    Attributes
    protected
    Definition Classes
    TwitterModule
  27. def bindOption[T](annotation: Annotation)(implicit arg0: Manifest[T]): ScalaOptionBinder[T]

    Permalink
    Attributes
    protected
    Definition Classes
    TwitterModule
  28. def bindOption[T, A <: Annotation](implicit arg0: Manifest[T], arg1: Manifest[A]): ScalaOptionBinder[T]

    Permalink
    Attributes
    protected
    Definition Classes
    TwitterModule
  29. def bindOption[T](implicit arg0: Manifest[T]): ScalaOptionBinder[T]

    Permalink
    Attributes
    protected
    Definition Classes
    TwitterModule
  30. def bindScope[T <: Annotation](scope: Scope)(implicit arg0: Manifest[T]): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    TwitterModule
  31. def bindScope(arg0: Class[_ <: Annotation], arg1: Scope): Unit

    Permalink
    Attributes
    protected[com.google.inject]
    Definition Classes
    AbstractModule
  32. def bindSingleton[T](annotation: Annotation)(implicit arg0: Manifest[T]): ScalaAnnotatedBindingBuilder[T]

    Permalink
    Attributes
    protected
    Definition Classes
    TwitterModule
  33. def bindSingleton[T, A <: Annotation](implicit arg0: Manifest[T], arg1: Manifest[A]): ScalaAnnotatedBindingBuilder[T]

    Permalink
    Attributes
    protected
    Definition Classes
    TwitterModule
  34. def bindSingleton[T](implicit arg0: Manifest[T]): ScalaAnnotatedBindingBuilder[T]

    Permalink
    Attributes
    protected
    Definition Classes
    TwitterModule
  35. def binder(): Binder

    Permalink
    Attributes
    protected[com.google.inject]
    Definition Classes
    AbstractModule
  36. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  37. def closeOnExit(f: ⇒ Unit): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    TwitterModuleLifecycle
  38. def configure(): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    TwitterModule → AbstractModule
  39. final def configure(arg0: Binder): Unit

    Permalink
    Definition Classes
    AbstractModule → Module
  40. def configureClient(injector: Injector, client: Client): Client

    Permalink
    Attributes
    protected
    Definition Classes
    StackClientModuleTrait
  41. def convertToTypes(arg0: Matcher[_ >: TypeLiteral[_]], arg1: TypeConverter): Unit

    Permalink
    Attributes
    protected[com.google.inject]
    Definition Classes
    AbstractModule
  42. final def createFlag[T](name: String, default: T, help: String, flaggable: Flaggable[T]): Flag[T]

    Permalink
    Definition Classes
    TwitterModuleFlags
  43. final def createMandatoryFlag[T](name: String, help: String, usage: String, flaggable: Flaggable[T]): Flag[T]

    Permalink
    Definition Classes
    TwitterModuleFlags
  44. def currentStage(): Stage

    Permalink
    Attributes
    protected[com.google.inject]
    Definition Classes
    AbstractModule
  45. def debug(marker: Marker, message: ⇒ Any, cause: Throwable): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  46. def debug(message: ⇒ Any, cause: Throwable): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  47. def debug(marker: Marker, message: ⇒ Any): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  48. def debug(message: ⇒ Any): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  49. def debugFutureResult[T](msg: String)(func: ⇒ Future[T]): Future[T]

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  50. def debugResult[T](message: ⇒ String)(fn: ⇒ T): T

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  51. def defaultClosableAwaitPeriod: Duration

    Permalink
    Attributes
    protected
    Definition Classes
    StackClientModuleTrait
  52. def defaultClosableGracePeriod: Duration

    Permalink
    Attributes
    protected
    Definition Classes
    StackClientModuleTrait
  53. def defaultHeaders: Map[String, String]

    Permalink
  54. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  55. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  56. def error(marker: Marker, message: ⇒ Any, cause: Throwable): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  57. def error(message: ⇒ Any, cause: Throwable): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  58. def error(marker: Marker, message: ⇒ Any): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  59. def error(message: ⇒ Any): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  60. def errorResult[T](message: ⇒ String)(fn: ⇒ T): T

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  61. def failfastOnFlagsNotParsed: Boolean

    Permalink
    Attributes
    protected[this]
    Definition Classes
    TwitterModuleFlags
  62. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  63. final def flag[T](name: String, help: String)(implicit arg0: Flaggable[T], arg1: Manifest[T]): Flag[T]

    Permalink
    Definition Classes
    TwitterModuleFlags
  64. final def flag[T](name: String, default: T, help: String)(implicit arg0: Flaggable[T]): Flag[T]

    Permalink
    Definition Classes
    TwitterModuleFlags
  65. val flags: ArrayBuffer[Flag[_]]

    Permalink
    Attributes
    protected[com.twitter.inject]
    Definition Classes
    TwitterModuleFlags
  66. def frameworkConfigureClient(injector: Injector, client: Client): Client

    Permalink
    Attributes
    protected[com.twitter]
    Definition Classes
    HttpClientModuleTrait → StackClientModuleTrait
  67. def frameworkModules: Seq[Module]

    Permalink
    Attributes
    protected[com.twitter.inject]
    Definition Classes
    TwitterBaseModule
  68. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  69. def getMembersInjector[T](implicit arg0: Manifest[T]): MembersInjector[T]

    Permalink
    Attributes
    protected[this]
    Definition Classes
    TwitterModule
    Annotations
    @throws( ... )
  70. def getMembersInjector[T](arg0: TypeLiteral[T]): MembersInjector[T]

    Permalink
    Attributes
    protected[com.google.inject]
    Definition Classes
    AbstractModule
  71. def getMembersInjector[T](arg0: Class[T]): MembersInjector[T]

    Permalink
    Attributes
    protected[com.google.inject]
    Definition Classes
    AbstractModule
  72. def getProvider[T](implicit arg0: Manifest[T]): Provider[T]

    Permalink
    Attributes
    protected[this]
    Definition Classes
    TwitterModule
    Annotations
    @throws( ... )
  73. def getProvider[T](arg0: Class[T]): Provider[T]

    Permalink
    Attributes
    protected[com.google.inject]
    Definition Classes
    AbstractModule
  74. def getProvider[T](arg0: Key[T]): Provider[T]

    Permalink
    Attributes
    protected[com.google.inject]
    Definition Classes
    AbstractModule
  75. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  76. def hostname: String

    Permalink
  77. def info(marker: Marker, message: ⇒ Any, cause: Throwable): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  78. def info(message: ⇒ Any, cause: Throwable): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  79. def info(marker: Marker, message: ⇒ Any): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  80. def info(message: ⇒ Any): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  81. def infoResult[T](message: ⇒ String)(fn: ⇒ T): T

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  82. def initialClientConfiguration(injector: Injector, client: Client, statsReceiver: StatsReceiver): Client

    Permalink
    Attributes
    protected
    Definition Classes
    StackClientModuleTrait
  83. def install(module: Module): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    TwitterModule → AbstractModule
    Annotations
    @throws( ... )
  84. def isDebugEnabled(marker: Marker): Boolean

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  85. def isDebugEnabled: Boolean

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  86. def isErrorEnabled(marker: Marker): Boolean

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  87. def isErrorEnabled: Boolean

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  88. def isInfoEnabled(marker: Marker): Boolean

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  89. def isInfoEnabled: Boolean

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  90. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  91. def isTraceEnabled(marker: Marker): Boolean

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  92. def isTraceEnabled: Boolean

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  93. def isWarnEnabled(marker: Marker): Boolean

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  94. def isWarnEnabled: Boolean

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  95. def javaModules: Collection[Module]

    Permalink
    Attributes
    protected[com.twitter.inject]
    Definition Classes
    TwitterBaseModule
  96. final def logger: Logger

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  97. final def loggerName: String

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  98. def modules: Seq[Module]

    Permalink
    Attributes
    protected[com.twitter.inject]
    Definition Classes
    TwitterBaseModule
  99. def monitor: Monitor

    Permalink
    Attributes
    protected
    Definition Classes
    StackClientModuleTrait
  100. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  101. final def newClient(injector: Injector, statsReceiver: StatsReceiver): Client

    Permalink
    Definition Classes
    HttpClientModuleTrait → StackClientModuleTrait
  102. final def newHttpClient(injector: Injector, statsReceiver: StatsReceiver, mapper: ScalaObjectMapper): HttpClient

    Permalink
  103. final def newService(injector: Injector, statsReceiver: StatsReceiver): Service[Request, Response]

    Permalink
    Attributes
    protected
    Definition Classes
    StackClientModuleTrait
  104. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  105. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  106. def requestInjection(arg0: Any): Unit

    Permalink
    Attributes
    protected[com.google.inject]
    Definition Classes
    AbstractModule
  107. def requestStaticInjection[T]()(implicit arg0: Manifest[T]): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    TwitterModule
  108. def requestStaticInjection(arg0: <repeated...>[Class[_]]): Unit

    Permalink
    Attributes
    protected[com.google.inject]
    Definition Classes
    AbstractModule
  109. def requestTimeout: Duration

    Permalink
    Attributes
    protected
    Definition Classes
    StackClientModuleTrait
  110. def requireBinding(arg0: Class[_]): Unit

    Permalink
    Attributes
    protected[com.google.inject]
    Definition Classes
    AbstractModule
  111. def requireBinding(arg0: Key[_]): Unit

    Permalink
    Attributes
    protected[com.google.inject]
    Definition Classes
    AbstractModule
  112. def retryBudget: RetryBudget

    Permalink
    Attributes
    protected
    Definition Classes
    StackClientModuleTrait
  113. def retryPolicy: Option[RetryPolicy[Try[Response]]]

    Permalink
  114. def scopeStatsReceiver(injector: Injector, statsReceiver: StatsReceiver): StatsReceiver

    Permalink
    Attributes
    protected
    Definition Classes
    StackClientModuleTrait
  115. def sessionAcquisitionTimeout: Duration

    Permalink
    Attributes
    protected
    Definition Classes
    StackClientModuleTrait
  116. def singletonPostWarmupComplete(injector: Injector): Unit

    Permalink
    Attributes
    protected[com.twitter.inject]
    Definition Classes
    TwitterModuleLifecycle
  117. def singletonShutdown(injector: Injector): Unit

    Permalink
    Attributes
    protected[com.twitter.inject]
    Definition Classes
    TwitterModuleLifecycle
  118. def singletonStartup(injector: Injector): Unit

    Permalink
    Attributes
    protected[com.twitter.inject]
    Definition Classes
    TwitterModuleLifecycle
  119. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  120. def time[T](formatStr: String)(func: ⇒ T): T

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  121. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  122. def trace(marker: Marker, message: ⇒ Any, cause: Throwable): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  123. def trace(message: ⇒ Any, cause: Throwable): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  124. def trace(marker: Marker, message: ⇒ Any): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  125. def trace(message: ⇒ Any): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  126. def traceResult[T](message: ⇒ String)(fn: ⇒ T): T

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  127. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  128. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  129. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  130. def warn(marker: Marker, message: ⇒ Any, cause: Throwable): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  131. def warn(message: ⇒ Any, cause: Throwable): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  132. def warn(marker: Marker, message: ⇒ Any): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  133. def warn(message: ⇒ Any): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  134. def warnResult[T](message: ⇒ String)(fn: ⇒ T): T

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging

Deprecated Value Members

  1. def createMultiBinder[MultiBindType](implicit arg0: Manifest[MultiBindType]): ScalaMultibinder[MultiBindType]

    Permalink
    Attributes
    protected
    Definition Classes
    TwitterModule
    Annotations
    @deprecated
    Deprecated

    (Since version 2019-10-16) Use bindMultiple[T]

Inherited from StackClientModuleTrait[Request, Response, Client]

Inherited from TwitterModule

Inherited from TwitterBaseModule

Inherited from TwitterModuleLifecycle

Inherited from Logging

Inherited from Logging

Inherited from TwitterModuleFlags

Inherited from AbstractModule

Inherited from Module

Inherited from AnyRef

Inherited from Any

Ungrouped