thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aditya Dalmia <>
Subject Usage of Thrift TServlet for Session operations
Date Thu, 09 Jun 2011 01:24:46 GMT
Apologies in advance if this is a stupid question.
I was going through the api for thrift TServlet and TProcessor and found
that I could not imagine a way to do user specific processing inside the
Service.Iface implementation.

Maybe code snippet would make things clearer
public MyServiceServlet extends TServlet {
  public MyServiceServlet() {
    super(new MyService.Processor(new MyServiceHandler()),
          new TJSONProtocol.Factory());

  private static class MyServiceHandler implements MyService.Iface {
    public boolean getUserSpecificTruth() {
      // Get information for the user HttpServletRequest.getUserPrincipal()
      // who initiated this request

Thanks in advance
Aditya Dalmia

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message