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
Пример #2
0
	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
Пример #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)
Пример #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)
Пример #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
Пример #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
Пример #7
0
 def __init__(self, application):
     HTTPServlet.__init__(self)
     Configurable.__init__(self)
     self._application = application
Пример #8
0
 def sleep(self, transaction):
     """End transaction."""
     self._transaction = None
     HTTPServlet.sleep(self, transaction)
Пример #9
0
 def awake(self, transaction):
     """Begin transaction."""
     HTTPServlet.awake(self, transaction)
     self._transaction = transaction
Пример #10
0
 def sleep(self, transaction):
     """End transaction."""
     self._transaction = None
     HTTPServlet.sleep(self, transaction)
Пример #11
0
 def awake(self, transaction):
     """Begin transaction."""
     HTTPServlet.awake(self, transaction)
     self._transaction = transaction
Пример #12
0
	def sleep(self, transaction):
		self._transaction = None
		HTTPServlet.sleep(self, transaction)
Пример #13
0
	def awake(self, transaction):
		HTTPServlet.awake(self, transaction)
		self._transaction = transaction