title: Can I apply filters server-side for finagle-thrift?
body: <p>I'm trying to write a finagle-thrift service that applies filters in the server.</p>
  
  <p>finagle-thrift generates a service interface (Iface) from the thrift IDL that you implement and then pass to the <code>Thrift.serveIface(addr, Iface)</code> method. There is another method <code>Thrift.serve(addr, Service[Req, Rep])</code> which could be used to serve a slightly more generic service. Services can be composed, so I'd like to do something like <code>Thrift.service(addr, myFilter andThen myService)</code> but I don't know how to convert an Iface to a Service. </p>
  
  <p>The <code>Thrift.serveIface</code> method uses a private method <code>serverFromIface</code> which does the Iface to Service transformation that would allow me to compose the service with filters before passing it to <code>Thrift.serve</code>. see: <a href="https://github.com/twitter/finagle/blob/master/finagle-thrift/src/main/scala/com/twitter/finagle/rich.scala" rel="nofollow">https://github.com/twitter/finagle/blob/master/finagle-thrift/src/main/scala/com/twitter/finagle/rich.scala</a></p>
  
  <p>Since that transformation is private, I don't know how I am supposed to apply filters in the server.</p>