Packages

  • package root
    Definition Classes
    root
  • package com
    Definition Classes
    root
  • package twitter

    Start with com.twitter.finagle.

    Definition Classes
    com
  • package finagle

    Finagle is an extensible RPC system.

    Finagle is an extensible RPC system.

    Services are represented by class com.twitter.finagle.Service. Clients make use of com.twitter.finagle.Service objects while servers implement them.

    Finagle contains a number of protocol implementations; each of these implement Client and/or com.twitter.finagle.Server. For example, Finagle's HTTP implementation, com.twitter.finagle.Http (in package finagle-http), exposes both.

    Thus a simple HTTP server is built like this:

    import com.twitter.finagle.{Http, Service}
    import com.twitter.finagle.http.{Request, Response}
    import com.twitter.util.{Await, Future}
    
    val service = new Service[Request, Response] {
      def apply(req: Request): Future[Response] =
        Future.value(Response())
    }
    val server = Http.server.serve(":8080", service)
    Await.ready(server)

    We first define a service to which requests are dispatched. In this case, the service returns immediately with a HTTP 200 OK response, and with no content.

    This service is then served via the Http protocol on TCP port 8080. Finally we wait for the server to stop serving.

    We can now query our web server:

    % curl -D - localhost:8080
    HTTP/1.1 200 OK

    Building an HTTP client is also simple. (Note that type annotations are added for illustration.)

    import com.twitter.finagle.{Http, Service}
    import com.twitter.finagle.http.{Request, Response}
    import com.twitter.util.{Future, Return, Throw}
    
    val client: Service[Request, Response] = Http.client.newService("localhost:8080")
    val f: Future[Response] = client(Request()).respond {
      case Return(rep) =>
        printf("Got HTTP response %s\n", rep)
      case Throw(exc) =>
        printf("Got error %s\n", exc)
    }

    Http.client.newService("localhost:8080") constructs a new com.twitter.finagle.Service instance connected to localhost TCP port 8080. We then issue a HTTP/1.1 GET request to URI "/". The service returns a com.twitter.util.Future representing the result of the operation. We listen to this future, printing an appropriate message when the response arrives.

    The Finagle homepage contains useful documentation and resources for using Finagle.

    Definition Classes
    twitter
  • object Stack

    Definition Classes
    finagle
    See also

    stack.nilStack for starting construction of an empty stack for ServiceFactorys.

  • Head
  • Module
  • Module0
  • Module1
  • Module2
  • Module3
  • Module4
  • Module5
  • Module6
  • Module7
  • Module8
  • Module9
  • ModuleParams
  • NoOpModule
  • Param
  • Parameterized
  • Params
  • ParamsInjector
  • Role
  • TransformParams
  • Transformable
  • Transformer

trait Params extends Iterable[(Param[_], Any)]

A parameter map.

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Params
  2. Iterable
  3. IterableFactoryDefaults
  4. IterableOps
  5. IterableOnceOps
  6. IterableOnce
  7. AnyRef
  8. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

  1. abstract def +[P](p: P)(implicit arg0: Param[P]): Params

    Produce a new parameter map, overriding any previous P-typed value.

    Produce a new parameter map, overriding any previous P-typed value.

    Java users may find it easier to use plus below.

  2. abstract def addAll(ps: Params): Params

    Produce a new parameter map, overriding any previously mapped values.

  3. abstract def apply[P](implicit arg0: Param[P]): P

    Get the current value of the P-typed parameter.

  4. abstract def contains[P](implicit arg0: Param[P]): Boolean

    Returns true if there is a non-default value for the P-typed parameter.

  5. abstract def iterator: Iterator[(Param[_], Any)]

    Iterator of all Params and their associated values.

    Iterator of all Params and their associated values.

    Definition Classes
    Params → IterableOnce

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. def ++(ps: Params): Params

    Alias for addAll(Params).

  4. final def ++[B >: (Param[_], Any)](suffix: IterableOnce[B]): Iterable[B]
    Definition Classes
    IterableOps
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  6. final def addString(b: StringBuilder): StringBuilder
    Definition Classes
    IterableOnceOps
    Annotations
    @inline()
  7. final def addString(b: StringBuilder, sep: String): StringBuilder
    Definition Classes
    IterableOnceOps
    Annotations
    @inline()
  8. def addString(b: StringBuilder, start: String, sep: String, end: String): StringBuilder
    Definition Classes
    IterableOnceOps
  9. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  10. def className: String
    Attributes
    protected[this]
    Definition Classes
    Iterable
  11. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  12. final def coll: Params.this.type
    Attributes
    protected
    Definition Classes
    Iterable → IterableOps
  13. def collect[B](pf: PartialFunction[(Param[_], Any), B]): Iterable[B]
    Definition Classes
    IterableOps → IterableOnceOps
  14. def collectFirst[B](pf: PartialFunction[(Param[_], Any), B]): Option[B]
    Definition Classes
    IterableOnceOps
  15. def concat[B >: (Param[_], Any)](suffix: IterableOnce[B]): Iterable[B]
    Definition Classes
    IterableOps
  16. def copyToArray[B >: (Param[_], Any)](xs: Array[B], start: Int, len: Int): Int
    Definition Classes
    IterableOnceOps
  17. def copyToArray[B >: (Param[_], Any)](xs: Array[B], start: Int): Int
    Definition Classes
    IterableOnceOps
    Annotations
    @deprecatedOverriding()
  18. def copyToArray[B >: (Param[_], Any)](xs: Array[B]): Int
    Definition Classes
    IterableOnceOps
    Annotations
    @deprecatedOverriding()
  19. def corresponds[B](that: IterableOnce[B])(p: ((Param[_], Any), B) => Boolean): Boolean
    Definition Classes
    IterableOnceOps
  20. def count(p: ((Param[_], Any)) => Boolean): Int
    Definition Classes
    IterableOnceOps
  21. def drop(n: Int): Iterable[(Param[_], Any)]
    Definition Classes
    IterableOps → IterableOnceOps
  22. def dropRight(n: Int): Iterable[(Param[_], Any)]
    Definition Classes
    IterableOps
  23. def dropWhile(p: ((Param[_], Any)) => Boolean): Iterable[(Param[_], Any)]
    Definition Classes
    IterableOps → IterableOnceOps
  24. def empty: Iterable[(Param[_], Any)]
    Definition Classes
    IterableFactoryDefaults → IterableOps
  25. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  26. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  27. def exists(p: ((Param[_], Any)) => Boolean): Boolean
    Definition Classes
    IterableOnceOps
  28. def filter(pred: ((Param[_], Any)) => Boolean): Iterable[(Param[_], Any)]
    Definition Classes
    IterableOps → IterableOnceOps
  29. def filterNot(pred: ((Param[_], Any)) => Boolean): Iterable[(Param[_], Any)]
    Definition Classes
    IterableOps → IterableOnceOps
  30. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  31. def find(p: ((Param[_], Any)) => Boolean): Option[(Param[_], Any)]
    Definition Classes
    IterableOnceOps
  32. def flatMap[B](f: ((Param[_], Any)) => IterableOnce[B]): Iterable[B]
    Definition Classes
    IterableOps → IterableOnceOps
  33. def flatten[B](implicit asIterable: ((Param[_], Any)) => IterableOnce[B]): Iterable[B]
    Definition Classes
    IterableOps → IterableOnceOps
  34. def fold[A1 >: (Param[_], Any)](z: A1)(op: (A1, A1) => A1): A1
    Definition Classes
    IterableOnceOps
  35. def foldLeft[B](z: B)(op: (B, (Param[_], Any)) => B): B
    Definition Classes
    IterableOnceOps
  36. def foldRight[B](z: B)(op: ((Param[_], Any), B) => B): B
    Definition Classes
    IterableOnceOps
  37. def forall(p: ((Param[_], Any)) => Boolean): Boolean
    Definition Classes
    IterableOnceOps
  38. def foreach[U](f: ((Param[_], Any)) => U): Unit
    Definition Classes
    IterableOnceOps
  39. def fromSpecific(coll: IterableOnce[(Param[_], Any)]): Iterable[(Param[_], Any)]
    Attributes
    protected
    Definition Classes
    IterableFactoryDefaults → IterableOps
  40. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  41. def groupBy[K](f: ((Param[_], Any)) => K): Map[K, Iterable[(Param[_], Any)]]
    Definition Classes
    IterableOps
  42. def groupMap[K, B](key: ((Param[_], Any)) => K)(f: ((Param[_], Any)) => B): Map[K, Iterable[B]]
    Definition Classes
    IterableOps
  43. def groupMapReduce[K, B](key: ((Param[_], Any)) => K)(f: ((Param[_], Any)) => B)(reduce: (B, B) => B): Map[K, B]
    Definition Classes
    IterableOps
  44. def grouped(size: Int): Iterator[Iterable[(Param[_], Any)]]
    Definition Classes
    IterableOps
  45. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  46. def head: (Param[_], Any)
    Definition Classes
    IterableOps
  47. def headOption: Option[(Param[_], Any)]
    Definition Classes
    IterableOps
  48. def init: Iterable[(Param[_], Any)]
    Definition Classes
    IterableOps
  49. def inits: Iterator[Iterable[(Param[_], Any)]]
    Definition Classes
    IterableOps
  50. def isEmpty: Boolean
    Definition Classes
    IterableOnceOps
  51. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  52. def isTraversableAgain: Boolean
    Definition Classes
    IterableOps → IterableOnceOps
  53. def iterableFactory: IterableFactory[Iterable]
    Definition Classes
    Iterable → IterableOps
  54. def knownSize: Int
    Definition Classes
    IterableOnce
  55. def last: (Param[_], Any)
    Definition Classes
    IterableOps
  56. def lastOption: Option[(Param[_], Any)]
    Definition Classes
    IterableOps
  57. def lazyZip[B](that: Iterable[B]): LazyZip2[(Param[_], Any), B, Params.this.type]
    Definition Classes
    Iterable
  58. def map[B](f: ((Param[_], Any)) => B): Iterable[B]
    Definition Classes
    IterableOps → IterableOnceOps
  59. def max[B >: (Param[_], Any)](implicit ord: Ordering[B]): (Param[_], Any)
    Definition Classes
    IterableOnceOps
  60. def maxBy[B](f: ((Param[_], Any)) => B)(implicit cmp: Ordering[B]): (Param[_], Any)
    Definition Classes
    IterableOnceOps
  61. def maxByOption[B](f: ((Param[_], Any)) => B)(implicit cmp: Ordering[B]): Option[(Param[_], Any)]
    Definition Classes
    IterableOnceOps
  62. def maxOption[B >: (Param[_], Any)](implicit ord: Ordering[B]): Option[(Param[_], Any)]
    Definition Classes
    IterableOnceOps
  63. def min[B >: (Param[_], Any)](implicit ord: Ordering[B]): (Param[_], Any)
    Definition Classes
    IterableOnceOps
  64. def minBy[B](f: ((Param[_], Any)) => B)(implicit cmp: Ordering[B]): (Param[_], Any)
    Definition Classes
    IterableOnceOps
  65. def minByOption[B](f: ((Param[_], Any)) => B)(implicit cmp: Ordering[B]): Option[(Param[_], Any)]
    Definition Classes
    IterableOnceOps
  66. def minOption[B >: (Param[_], Any)](implicit ord: Ordering[B]): Option[(Param[_], Any)]
    Definition Classes
    IterableOnceOps
  67. final def mkString: String
    Definition Classes
    IterableOnceOps
    Annotations
    @inline()
  68. final def mkString(sep: String): String
    Definition Classes
    IterableOnceOps
    Annotations
    @inline()
  69. final def mkString(start: String, sep: String, end: String): String
    Definition Classes
    IterableOnceOps
  70. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  71. def newSpecificBuilder: Builder[(Param[_], Any), Iterable[(Param[_], Any)]]
    Attributes
    protected
    Definition Classes
    IterableFactoryDefaults → IterableOps
  72. def nonEmpty: Boolean
    Definition Classes
    IterableOnceOps
    Annotations
    @deprecatedOverriding()
  73. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  74. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  75. def partition(p: ((Param[_], Any)) => Boolean): (Iterable[(Param[_], Any)], Iterable[(Param[_], Any)])
    Definition Classes
    IterableOps
  76. def partitionMap[A1, A2](f: ((Param[_], Any)) => Either[A1, A2]): (Iterable[A1], Iterable[A2])
    Definition Classes
    IterableOps
  77. def plus[P](typeAndParam: (P, Param[P])): Params

    Java-friendly API for +.

    Java-friendly API for +.

    The Tuple2 can be created by calls to a mk(): (P, Param[P]) method on parameters (see com.twitter.finagle.service.TimeoutFilter.Param.mk() as an example).

  78. def product[B >: (Param[_], Any)](implicit num: Numeric[B]): B
    Definition Classes
    IterableOnceOps
  79. def reduce[B >: (Param[_], Any)](op: (B, B) => B): B
    Definition Classes
    IterableOnceOps
  80. def reduceLeft[B >: (Param[_], Any)](op: (B, (Param[_], Any)) => B): B
    Definition Classes
    IterableOnceOps
  81. def reduceLeftOption[B >: (Param[_], Any)](op: (B, (Param[_], Any)) => B): Option[B]
    Definition Classes
    IterableOnceOps
  82. def reduceOption[B >: (Param[_], Any)](op: (B, B) => B): Option[B]
    Definition Classes
    IterableOnceOps
  83. def reduceRight[B >: (Param[_], Any)](op: ((Param[_], Any), B) => B): B
    Definition Classes
    IterableOnceOps
  84. def reduceRightOption[B >: (Param[_], Any)](op: ((Param[_], Any), B) => B): Option[B]
    Definition Classes
    IterableOnceOps
  85. def reversed: Iterable[(Param[_], Any)]
    Attributes
    protected
    Definition Classes
    IterableOnceOps
  86. def scan[B >: (Param[_], Any)](z: B)(op: (B, B) => B): Iterable[B]
    Definition Classes
    IterableOps
  87. def scanLeft[B](z: B)(op: (B, (Param[_], Any)) => B): Iterable[B]
    Definition Classes
    IterableOps → IterableOnceOps
  88. def scanRight[B](z: B)(op: ((Param[_], Any), B) => B): Iterable[B]
    Definition Classes
    IterableOps
  89. def size: Int
    Definition Classes
    IterableOnceOps
  90. def sizeCompare(that: Iterable[_]): Int
    Definition Classes
    IterableOps
  91. def sizeCompare(otherSize: Int): Int
    Definition Classes
    IterableOps
  92. final def sizeIs: SizeCompareOps
    Definition Classes
    IterableOps
    Annotations
    @inline()
  93. def slice(from: Int, until: Int): Iterable[(Param[_], Any)]
    Definition Classes
    IterableOps → IterableOnceOps
  94. def sliding(size: Int, step: Int): Iterator[Iterable[(Param[_], Any)]]
    Definition Classes
    IterableOps
  95. def sliding(size: Int): Iterator[Iterable[(Param[_], Any)]]
    Definition Classes
    IterableOps
  96. def span(p: ((Param[_], Any)) => Boolean): (Iterable[(Param[_], Any)], Iterable[(Param[_], Any)])
    Definition Classes
    IterableOps → IterableOnceOps
  97. def splitAt(n: Int): (Iterable[(Param[_], Any)], Iterable[(Param[_], Any)])
    Definition Classes
    IterableOps → IterableOnceOps
  98. def stepper[S <: Stepper[_]](implicit shape: StepperShape[(Param[_], Any), S]): S
    Definition Classes
    IterableOnce
  99. def stringPrefix: String
    Attributes
    protected[this]
    Definition Classes
    Iterable
    Annotations
    @deprecatedOverriding()
  100. def sum[B >: (Param[_], Any)](implicit num: Numeric[B]): B
    Definition Classes
    IterableOnceOps
  101. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  102. def tail: Iterable[(Param[_], Any)]
    Definition Classes
    IterableOps
  103. def tails: Iterator[Iterable[(Param[_], Any)]]
    Definition Classes
    IterableOps
  104. def take(n: Int): Iterable[(Param[_], Any)]
    Definition Classes
    IterableOps → IterableOnceOps
  105. def takeRight(n: Int): Iterable[(Param[_], Any)]
    Definition Classes
    IterableOps
  106. def takeWhile(p: ((Param[_], Any)) => Boolean): Iterable[(Param[_], Any)]
    Definition Classes
    IterableOps → IterableOnceOps
  107. def tapEach[U](f: ((Param[_], Any)) => U): Iterable[(Param[_], Any)]
    Definition Classes
    IterableOps → IterableOnceOps
  108. def to[C1](factory: Factory[(Param[_], Any), C1]): C1
    Definition Classes
    IterableOnceOps
  109. def toArray[B >: (Param[_], Any)](implicit arg0: ClassTag[B]): Array[B]
    Definition Classes
    IterableOnceOps
  110. final def toBuffer[B >: (Param[_], Any)]: Buffer[B]
    Definition Classes
    IterableOnceOps
    Annotations
    @inline()
  111. def toIndexedSeq: IndexedSeq[(Param[_], Any)]
    Definition Classes
    IterableOnceOps
  112. final def toIterable: Params.this.type
    Definition Classes
    Iterable → IterableOps
  113. def toList: List[(Param[_], Any)]
    Definition Classes
    IterableOnceOps
  114. def toMap[K, V](implicit ev: <:<[(Param[_], Any), (K, V)]): Map[K, V]
    Definition Classes
    IterableOnceOps
  115. def toSeq: Seq[(Param[_], Any)]
    Definition Classes
    IterableOnceOps
  116. def toSet[B >: (Param[_], Any)]: Set[B]
    Definition Classes
    IterableOnceOps
  117. def toString(): String
    Definition Classes
    Iterable → AnyRef → Any
  118. def toVector: Vector[(Param[_], Any)]
    Definition Classes
    IterableOnceOps
  119. def transpose[B](implicit asIterable: ((Param[_], Any)) => Iterable[B]): Iterable[Iterable[B]]
    Definition Classes
    IterableOps
  120. def unzip[A1, A2](implicit asPair: ((Param[_], Any)) => (A1, A2)): (Iterable[A1], Iterable[A2])
    Definition Classes
    IterableOps
  121. def unzip3[A1, A2, A3](implicit asTriple: ((Param[_], Any)) => (A1, A2, A3)): (Iterable[A1], Iterable[A2], Iterable[A3])
    Definition Classes
    IterableOps
  122. def view: View[(Param[_], Any)]
    Definition Classes
    IterableOps
  123. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  124. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  125. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  126. def withFilter(p: ((Param[_], Any)) => Boolean): WithFilter[(Param[_], Any), Iterable]
    Definition Classes
    IterableOps
  127. def zip[B](that: IterableOnce[B]): Iterable[((Param[_], Any), B)]
    Definition Classes
    IterableOps
  128. def zipAll[A1 >: (Param[_], Any), B](that: Iterable[B], thisElem: A1, thatElem: B): Iterable[(A1, B)]
    Definition Classes
    IterableOps
  129. def zipWithIndex: Iterable[((Param[_], Any), Int)]
    Definition Classes
    IterableOps → IterableOnceOps

Deprecated Value Members

  1. def ++:[B >: (Param[_], Any)](that: IterableOnce[B]): Iterable[B]
    Definition Classes
    IterableOps
    Annotations
    @deprecated
    Deprecated

    (Since version 2.13.0) Use ++ instead of ++: for collections of type Iterable

  2. final def /:[B](z: B)(op: (B, (Param[_], Any)) => B): B
    Definition Classes
    IterableOnceOps
    Annotations
    @deprecated @inline()
    Deprecated

    (Since version 2.13.0) Use foldLeft instead of /:

  3. final def :\[B](z: B)(op: ((Param[_], Any), B) => B): B
    Definition Classes
    IterableOnceOps
    Annotations
    @deprecated @inline()
    Deprecated

    (Since version 2.13.0) Use foldRight instead of :\

  4. def aggregate[B](z: => B)(seqop: (B, (Param[_], Any)) => B, combop: (B, B) => B): B
    Definition Classes
    IterableOnceOps
    Annotations
    @deprecated
    Deprecated

    (Since version 2.13.0) aggregate is not relevant for sequential collections. Use foldLeft(z)(seqop) instead.

  5. def companion: IterableFactory[Iterable]
    Definition Classes
    IterableOps
    Annotations
    @deprecated @deprecatedOverriding() @inline()
    Deprecated

    (Since version 2.13.0) Use iterableFactory instead

  6. final def copyToBuffer[B >: (Param[_], Any)](dest: Buffer[B]): Unit
    Definition Classes
    IterableOnceOps
    Annotations
    @deprecated @inline()
    Deprecated

    (Since version 2.13.0) Use dest ++= coll instead

  7. def hasDefiniteSize: Boolean
    Definition Classes
    IterableOnceOps
    Annotations
    @deprecated
    Deprecated

    (Since version 2.13.0) Check .knownSize instead of .hasDefiniteSize for more actionable information (see scaladoc for details)

  8. final def repr: Iterable[(Param[_], Any)]
    Definition Classes
    IterableOps
    Annotations
    @deprecated
    Deprecated

    (Since version 2.13.0) Use coll instead of repr in a collection implementation, use the collection value itself from the outside

  9. def seq: Params.this.type
    Definition Classes
    Iterable
    Annotations
    @deprecated
    Deprecated

    (Since version 2.13.0) Iterable.seq always returns the iterable itself

  10. final def toIterator: Iterator[(Param[_], Any)]
    Definition Classes
    IterableOnceOps
    Annotations
    @deprecated @inline()
    Deprecated

    (Since version 2.13.0) Use .iterator instead of .toIterator

  11. final def toStream: Stream[(Param[_], Any)]
    Definition Classes
    IterableOnceOps
    Annotations
    @deprecated @inline()
    Deprecated

    (Since version 2.13.0) Use .to(LazyList) instead of .toStream

  12. final def toTraversable: Traversable[(Param[_], Any)]
    Definition Classes
    IterableOps
    Annotations
    @deprecated
    Deprecated

    (Since version 2.13.0) Use toIterable instead

  13. def view(from: Int, until: Int): View[(Param[_], Any)]
    Definition Classes
    IterableOps
    Annotations
    @deprecated
    Deprecated

    (Since version 2.13.0) Use .view.slice(from, until) instead of .view(from, until)

Inherited from Iterable[(Param[_], Any)]

Inherited from IterableFactoryDefaults[(Param[_], Any), Iterable]

Inherited from IterableOps[(Param[_], Any), Iterable, Iterable[(Param[_], Any)]]

Inherited from IterableOnceOps[(Param[_], Any), Iterable, Iterable[(Param[_], Any)]]

Inherited from IterableOnce[(Param[_], Any)]

Inherited from AnyRef

Inherited from Any

Ungrouped