class StatsFilter[REQUEST <: Request] extends SimpleFilter[REQUEST, Response]
Statistic filter.
Add counters: status.[code] status.[class] And metrics: time.[code] time.[class]
- Alphabetic
- By Inheritance
- StatsFilter
- SimpleFilter
- Filter
- Function2
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new StatsFilter(stats: StatsReceiver)
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def agnosticAndThen(next: TypeAgnostic): Filter[REQUEST, Response, REQUEST, Response]
Convert the Filter.TypeAgnostic filter to a Filter and chain it with
andThen
.Convert the Filter.TypeAgnostic filter to a Filter and chain it with
andThen
.- Definition Classes
- Filter
- def andThen(factory: ServiceFactory[REQUEST, Response]): ServiceFactory[REQUEST, Response]
Terminates a filter chain in a ServiceFactory.
Terminates a filter chain in a ServiceFactory. For example,
myFilter.andThen(myServiceFactory)
- factory
a service factory that takes the output request type and the input response type.
- Definition Classes
- Filter
- def andThen(service: Service[REQUEST, Response]): Service[REQUEST, Response]
Terminates a filter chain in a Service.
- def andThen[Req2, Rep2](next: Filter[REQUEST, Response, Req2, Rep2]): Filter[REQUEST, Response, Req2, Rep2]
Chains a series of filters together:
Chains a series of filters together:
myModularService = handleExceptions.andThen(thrift2Pojo.andThen(parseString))
- next
another filter to follow after this one
- Definition Classes
- Filter
- Note
synchronously thrown exceptions in the underlying service are automatically lifted into Future.exception.
- def andThenIf[Req2 >: REQUEST, Rep2 <: Response](condAndFilter: (Boolean, Filter[REQUEST, Response, Req2, Rep2])): Filter[REQUEST, Response, Req2, Rep2]
Conditionally propagates requests down the filter chain.
Conditionally propagates requests down the filter chain. This may be useful if you are statically wiring together filter chains based on a configuration file, for instance.
- condAndFilter
a tuple of boolean and filter.
- Definition Classes
- Filter
- def andThenIf[Req2 >: REQUEST, Rep2 <: Response](conditional: Boolean, filter: Filter[REQUEST, Response, Req2, Rep2]): Filter[REQUEST, Response, Req2, Rep2]
Conditionally propagates requests down the filter chain.
Conditionally propagates requests down the filter chain. This may be useful if you are statically wiring together filter chains based on a configuration file, for instance.
- conditional
a boolean value indicating whether the filter should be included in the filter chain.
- filter
the filter to be conditionally included.
- Definition Classes
- Filter
- def apply(request: REQUEST, service: Service[REQUEST, Response]): Future[Response]
This is the method to override/implement to create your own Filter.
This is the method to override/implement to create your own Filter.
- request
the input request type
- service
a service that takes the output request type and the input response type
- Definition Classes
- StatsFilter → Filter → Function2
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def curried: (REQUEST) => (Service[REQUEST, Response]) => Future[Response]
- Definition Classes
- Function2
- Annotations
- @unspecialized()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- Filter → Function2 → AnyRef → Any
- def tupled: ((REQUEST, Service[REQUEST, Response])) => Future[Response]
- Definition Classes
- Function2
- Annotations
- @unspecialized()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()