コード例 #1
0
ファイル: ajp.py プロジェクト: HiPiH/life
    def __init__(
        self,
        application,
        scriptName="",
        environ=None,
        multithreaded=True,
        multiprocess=False,
        bindAddress=("localhost", 8009),
        allowedServers=None,
        loggingLevel=logging.INFO,
        debug=False,
        **kw
    ):
        """
        scriptName is the initial portion of the URL path that "belongs"
        to your application. It is used to determine PATH_INFO (which doesn't
        seem to be passed in). An empty scriptName means your application
        is mounted at the root of your virtual host.

        environ, which must be a dictionary, can contain any additional
        environment variables you want to pass to your application.

        bindAddress is the address to bind to, which must be a tuple of
        length 2. The first element is a string, which is the host name
        or IPv4 address of a local interface. The 2nd element is the port
        number.

        allowedServers must be None or a list of strings representing the
        IPv4 addresses of servers allowed to connect. None means accept
        connections from anywhere.

        loggingLevel sets the logging level of the module-level logger.
        """
        BaseAJPServer.__init__(
            self,
            application,
            scriptName=scriptName,
            environ=environ,
            multithreaded=multithreaded,
            multiprocess=multiprocess,
            bindAddress=bindAddress,
            allowedServers=allowedServers,
            loggingLevel=loggingLevel,
            debug=debug,
        )
        for key in ("jobClass", "jobArgs"):
            if kw.has_key(key):
                del kw[key]
        ThreadedServer.__init__(self, jobClass=Connection, jobArgs=(self,), **kw)
コード例 #2
0
ファイル: ajp.py プロジェクト: HiPiH/life
    def __init__(self,
                 application,
                 scriptName='',
                 environ=None,
                 multithreaded=True,
                 multiprocess=False,
                 bindAddress=('localhost', 8009),
                 allowedServers=None,
                 loggingLevel=logging.INFO,
                 debug=False,
                 **kw):
        """
        scriptName is the initial portion of the URL path that "belongs"
        to your application. It is used to determine PATH_INFO (which doesn't
        seem to be passed in). An empty scriptName means your application
        is mounted at the root of your virtual host.

        environ, which must be a dictionary, can contain any additional
        environment variables you want to pass to your application.

        bindAddress is the address to bind to, which must be a tuple of
        length 2. The first element is a string, which is the host name
        or IPv4 address of a local interface. The 2nd element is the port
        number.

        allowedServers must be None or a list of strings representing the
        IPv4 addresses of servers allowed to connect. None means accept
        connections from anywhere.

        loggingLevel sets the logging level of the module-level logger.
        """
        BaseAJPServer.__init__(self,
                               application,
                               scriptName=scriptName,
                               environ=environ,
                               multithreaded=multithreaded,
                               multiprocess=multiprocess,
                               bindAddress=bindAddress,
                               allowedServers=allowedServers,
                               loggingLevel=loggingLevel,
                               debug=debug)
        for key in ('jobClass', 'jobArgs'):
            if kw.has_key(key):
                del kw[key]
        ThreadedServer.__init__(self,
                                jobClass=Connection,
                                jobArgs=(self, ),
                                **kw)