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
Esempio n. 3
0
    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)
Esempio n. 4
0
    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)
Esempio n. 5
0
    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
Esempio n. 6
0
    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
Esempio n. 7
0
 def __init__(self, application):
     HTTPServlet.__init__(self)
     Configurable.__init__(self)
     self._application = application
Esempio n. 8
0
 def sleep(self, transaction):
     """End transaction."""
     self._transaction = None
     HTTPServlet.sleep(self, transaction)
Esempio n. 9
0
 def awake(self, transaction):
     """Begin transaction."""
     HTTPServlet.awake(self, transaction)
     self._transaction = transaction
Esempio n. 10
0
 def sleep(self, transaction):
     """End transaction."""
     self._transaction = None
     HTTPServlet.sleep(self, transaction)
Esempio n. 11
0
 def awake(self, transaction):
     """Begin transaction."""
     HTTPServlet.awake(self, transaction)
     self._transaction = transaction
Esempio n. 12
0
	def sleep(self, transaction):
		self._transaction = None
		HTTPServlet.sleep(self, transaction)
Esempio n. 13
0
	def awake(self, transaction):
		HTTPServlet.awake(self, transaction)
		self._transaction = transaction