[Zope3-checkins] CVS: Zope3/src/zope/app/interfaces/applicationcontrol - __init__.py:1.1.2.1 applicationcontrol.py:1.1.2.1 runtimeinfo.py:1.1.2.1 servercontrol.py:1.1.2.1 zopeversion.py:1.1.2.1

Jim Fulton jim@zope.com
Mon, 23 Dec 2002 14:31:43 -0500


Update of /cvs-repository/Zope3/src/zope/app/interfaces/applicationcontrol
In directory cvs.zope.org:/tmp/cvs-serv19908/zope/app/interfaces/applicationcontrol

Added Files:
      Tag: NameGeddon-branch
	__init__.py applicationcontrol.py runtimeinfo.py 
	servercontrol.py zopeversion.py 
Log Message:
Initial renaming before debugging

=== Added File Zope3/src/zope/app/interfaces/applicationcontrol/__init__.py ===
#
# This file is necessary to make this directory a package.


=== Added File Zope3/src/zope/app/interfaces/applicationcontrol/applicationcontrol.py ===
##############################################################################
#
# 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.0 (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.
# 
##############################################################################
__doc__ = """ Application Control Interface

$Id: applicationcontrol.py,v 1.1.2.1 2002/12/23 19:31:42 jim Exp $"""

from zope.interface import Interface

class IApplicationControl(Interface):
    """ """

    def getStartTime():
        """Return the time the application started
        
           in seconds since the epoch"""


=== Added File Zope3/src/zope/app/interfaces/applicationcontrol/runtimeinfo.py ===
##############################################################################
#
# 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.0 (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.
# 
##############################################################################
__doc__ = """ Runtime Information Interface

$Id: runtimeinfo.py,v 1.1.2.1 2002/12/23 19:31:42 jim Exp $"""

from zope.interface import Interface

class IRuntimeInfo(Interface):
    """ Runtime Information Adapter for Application Control """

    def getZopeVersion():
        """Return a string containing the descriptive version of the
           current zope installation"""

    def getPythonVersion():
        """Return a string containing verbose description of the python
           interpreter"""
    
    def getPythonPath():
        """Return a tuple containing the lookup paths of the python interpreter
        """

    def getSystemPlatform():
        """Return the system platform name in a 5 tuple of
           (sysname, nodename, release, version, machine)"""

    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 a string containing the Zope server uptime in unix uptime
           format with seconds ([NN days, ]HH:MM:SS)"""



=== Added File Zope3/src/zope/app/interfaces/applicationcontrol/servercontrol.py ===
##############################################################################
#
# 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.0 (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.
# 
##############################################################################
__doc__ = """ Server Control Interface

$Id: servercontrol.py,v 1.1.2.1 2002/12/23 19:31:42 jim Exp $"""

from zope.interface import Interface

class ServerControlError(Exception):
    """Represents an error in the ServerControl.
    """

class DoublePriorityError(ServerControlError):
    """Raisen when somebody tries to register a second Hook
       for a priority."""

class NotCallableError(ServerControlError):
    """Raisen if a given object is not callable."""

class IServerControl(Interface):
    """Server Control 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():
        """Shutdown the server gracefully

                Returns: Nothing
        """

    def restart():
        """Restart the server gracefully

                Returns: Nothing
        """

    def registerShutdownHook(call, priority, name):
        """Register a function that will be callen on server shutdown.
           The function needs to takes no argument at all."""


=== Added File Zope3/src/zope/app/interfaces/applicationcontrol/zopeversion.py ===
##############################################################################
#
# 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.0 (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.
#
##############################################################################
__doc__ = """Zope version interface

$Id: zopeversion.py,v 1.1.2.1 2002/12/23 19:31:42 jim Exp $"""

from zope.interface import Interface

class IZopeVersion(Interface):
    """ Zope version """

    def getZopeVersion():
        """Return a string containing the Zope version (possibly including
           CVS information)"""