/usr/share/pyshared/zope/applicationcontrol/interfaces.py is in python-zope.applicationcontrol 3.5.5-0ubuntu4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 | ##############################################################################
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
"""Application Control Interface
$Id: interfaces.py 107931 2010-01-09 14:42:28Z faassen $
"""
__docformat__ = 'restructuredtext'
from zope.interface import Interface
class IApplicationControl(Interface):
"""The application control instance is usually generated upon startup and
can therefore record the startup time."""
def getStartTime():
"""Return time the application started in seconds since the epoch."""
class IRuntimeInfo(Interface):
"""Runtime Information Adapter for Application Control"""
def getDeveloperMode():
"""Return the current developer mode setting"""
def getPreferredEncoding():
"""Return the encoding used for text data, according
to user system preferences"""
def getFileSystemEncoding():
"""Return the name of the encoding used to convert
Unicode filenames into system file names"""
def getZopeVersion():
"""Return a string containing the descriptive version of the
current zope installation.
Deprecated: the concept of a Zope version went away in the
Zope Toolkit. It is unlikely this gives sensible results in
many situations.
"""
def getPythonVersion():
"""Return an unicode string containing verbose description
of the python interpreter"""
def getPythonPath():
"""Return a tuple containing an unicode strings containing
the lookup paths of the python interpreter"""
def getSystemPlatform():
"""Return an unicode string containing the system platform name
"""
def getCommandLine():
"""Return the command line string Zope was invoked with"""
def getProcessId():
"""Return the process id number currently serving the request"""
def getUptime():
"""Return the Zope server uptime in seconds"""
class IZopeVersion(Interface):
"""Zope version
Note: The notion of a zope version is deprecated to the Zope Toolkit.
"""
def getZopeVersion():
"""Return a string containing the Zope version (possibly including
SVN information)"""
class IServerControl(Interface):
"""Defines methods for shutting down and restarting the server.
This utility also keeps a registry of things to call when shutting down
zope. You can register using this interface or the zcml on the global
ServerController instance.
"""
def shutdown(time=0):
"""Shutdown the server.
The `time` should be greater-equal 0.
If the `time` is 0, then we do a hard shutdown, i.e. closing
all sockets without waiting for tasks to complete.
If the `time` is not 0, then we will give the tasks `time` seconds to
finish before shutting down.
"""
def restart(time=0):
"""Restart the server.
The `time` should be greater-equal 0.
If the `time` is 0, then we do a hard shutdown, i.e. closing
all sockets without waiting for tasks to complete.
If the `time` is not 0, then we will give the tasks `time` seconds to
finish before shutting down.
"""
|