def __init__(self, application=None): HTTPServlet.__init__(self) Configurable.__init__(self) if application is None: from WebKit.AppServer import globalAppServer application = globalAppServer.application() assert application is not None self._application = application
def __init__(self, application=None): HTTPServlet.__init__(self) Configurable.__init__(self) if application is None: from AppServer import globalAppServer application = globalAppServer.application() assert application is not None self._application = application
def sleep(self, transaction): """Let servlet sleep again. We unset some variables. Very boring. """ self._session = None self._request = None self._response = None self._transaction = None HTTPServlet.sleep(self, transaction)
def awake(self, transaction): """Let servlet awake. Makes instance variables from the transaction. This is where Page becomes unthreadsafe, as the page is tied to the transaction. This is also what allows us to implement functions like `write`, where you don't need to pass in the transaction or response. """ HTTPServlet.awake(self, transaction) self._response = transaction.response() self._request = transaction.request() self._session = None # don't create unless needed
def awake(self, transaction): """Let servlet awake. Makes instance variables from the transaction. This is where Page becomes unthreadsafe, as the page is tied to the transaction. This is also what allows us to implement functions like `write`, where you don't need to pass in the transaction or response. """ HTTPServlet.awake(self, transaction) self._response = transaction.response() self._request = transaction.request() self._session = None # don't create unless needed assert self._transaction is not None assert self._response is not None assert self._request is not None
def __init__(self, application): HTTPServlet.__init__(self) Configurable.__init__(self) self._application = application
def sleep(self, transaction): """End transaction.""" self._transaction = None HTTPServlet.sleep(self, transaction)
def awake(self, transaction): """Begin transaction.""" HTTPServlet.awake(self, transaction) self._transaction = transaction
def sleep(self, transaction): self._transaction = None HTTPServlet.sleep(self, transaction)
def awake(self, transaction): HTTPServlet.awake(self, transaction) self._transaction = transaction