def __init__(self, *args, **kwargs): HttpChannel.__init__(self, *args, **kwargs) class requestHandler(tornado.web.RequestHandler): """The RequestHandler class for this Channel.""" @tornado.web.asynchronous def post(inner_self): """Process an incoming request.""" self.processRequest(inner_self) self.request_handler = requestHandler
def __init__(self, *args, **kwargs): Resource.__init__(self) HttpChannel.__init__(self, *args, **kwargs)
def decode(self, raw_request, request): """Overridden to add Twisted's request object onto the packet.""" decoded = HttpChannel.decode(self, raw_request) setattr(decoded, self.TWISTED_REQUEST, request) return decoded
def decode(self, request_handler): """Overridden to add Tornado's request object onto the packet.""" decoded = HttpChannel.decode(self, request_handler.request.body) setattr(decoded, self.TORNADO_REQUEST, request_handler) return decoded