hi, is that a way to invoke a function in httpFactory from a http.request? code here:<br>from twisted.web import http<br>class anotherRequestHandler(http.Request):<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; def process(self):<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '''<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; how to invoke a method in anotherHttpFactory
<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; such as judge?<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '''<br><br>class anotherHttp(http.HTTPChannel):<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; requestFactory = anotherRequestHandler<br><br>class&nbsp; resolve:<br>&nbsp; &nbsp; &nbsp; &nbsp; def&nbsp; show(self):<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; return 'ok'
<br>&nbsp;<br>class anotherHttpFactory(http.HTTPFactory):<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; def __init__(self):<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; a = resolve()<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; def judge(self):<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return a.show()<br><br><br>I don't want class 'resolve' to be initialized every time when a request comes, or am I&nbsp; mis-understand it ? Thanks for help.
<br><br>