class OptionallyServableFilter[Req, Rep] extends SimpleFilter[Req, Rep]
A com.twitter.finagle.Filter that uses an argument function to predicate whether or not to apply the subsequent com.twitter.finagle.Service. In cases where the function returns false, a the filter fails with a com.twitter.finagle.NotServableException.
- Alphabetic
- By Inheritance
- OptionallyServableFilter
- SimpleFilter
- Filter
- Function2
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
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[Req, Rep, Req, Rep]
Convert the TypeAgnostic filter to a Filter and chain it with
andThen
.Convert the TypeAgnostic filter to a Filter and chain it with
andThen
.- Definition Classes
- Filter
-
def
andThen(factory: ServiceFactory[Req, Rep]): ServiceFactory[Req, Rep]
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[Req, Rep]): Service[Req, Rep]
Terminates a filter chain in a Service.
-
def
andThen[Req2, Rep2](next: Filter[Req, Rep, Req2, Rep2]): Filter[Req, Rep, 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 >: Req, Rep2 <: Rep](condAndFilter: (Boolean, Filter[Req, Rep, Req2, Rep2])): Filter[Req, Rep, Req2, Rep2]
Conditionally propagates requests down the filter chain.
Conditionally propagates requests down the filter chain. This may 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
apply(req: Req, service: Service[Req, Rep]): Future[Rep]
This is the method to override/implement to create your own Filter.
This is the method to override/implement to create your own Filter.
- service
a service that takes the output request type and the input response type
- Definition Classes
- OptionallyServableFilter → Filter → Function2
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
curried: (Req) ⇒ (Service[Req, Rep]) ⇒ Future[Rep]
- Definition Classes
- Function2
- Annotations
- @unspecialized()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- Function2 → AnyRef → Any
-
def
tupled: ((Req, Service[Req, Rep])) ⇒ Future[Rep]
- Definition Classes
- Function2
- Annotations
- @unspecialized()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )