template<typename ReqA, typename RespA, typename ReqB = ReqA, typename RespB = RespA>
class wangle::ServiceFilter< ReqA, RespA, ReqB, RespB >
A Filter acts as a decorator/transformer of a service. It may apply transformations to the input and output of that service:
class MyService
ReqA -> | | -> ReqB | <- RespB RespA <- |
For example, you may have a service that takes Strings and parses them as Ints. If you want to expose this as a Network Service via Thrift, it is nice to isolate the protocol handling from the business rules. Hence you might have a Filter that converts back and forth between Thrift structs:
[ThriftIn -> (String -> Int) -> ThriftOut]
Definition at line 67 of file Service.h.