Package gnue :: Package common :: Package apps :: Module GServerApp :: Class GServerApp
[show private | hide private]

Class GServerApp

GBaseApp --+
           |
          GServerApp


This is the basse class for server applications
Method Summary
  __init__(self, connections, application, defaults)
  daemonize(self)
Turn ourselves into a daemon/service/etc.
  run(self)
This can be overwritten by code necessary for startup.
  shutdown(self)
Called when a request to shutdown the server is received
    Inherited from GBaseApp
  addCommandOption(self, *args, **parms)
Create a new command option and add it to the options sequence.
  analyzeCycle(self, cycle)
Return a generator for iterating a given reference cycle.
  buildHelpOptions(self, category)
Build 'help text' for all options of the given category.
  debugGarbageCollection(self, signal, frame)
Debug Python's garbage collection.
  doHelpConfig(self)
Display all configuration settings and their default values and quit the program.
  doSelfDoc(self)
Run the self documentation.
  doVersion(self)
Display the version information and quit the program.
  excepthook(self, etype, value, traceback)
This function catches an exception and evaluates it using getException().
  findCycle(self, search, current, last, path, seen)
Find a reference cycle starting from a given object(current) and ending with a given object(search).
  getCommandLineParameters(self, paramList)
Convert a sequence of parameters (i.e.
  handleStartupError(self, msg)
Display a startup error and exit gracefully.
  printHelp(self)
Print help information for this application and quit the program.
  printHelpConn(self)
Print connection/database-related help information and quit the program.
  printHelpDev(self)
Print help information for this application and quit the program.
  printHelpFooter(self)
Print the help footer including the address for bug reports.
  printHelpHeader(self)
Print version information and the usage header
  printVersion(self)
Display version information for this application
  selfdoc(self, command, handle, format, options)
Run the self-documentation for an application.

Class Variable Summary
    Inherited from GBaseApp
list ARGUMENTS = []
str AUTHOR = 'GNU Enterprise Project'
str COMMAND = 'app'
list COMMAND_OPTIONS = []
str CONFIGFILE = 'gnue.conf'
NoneType connections = None                                                                  
str EMAIL = 'info@gnue.org'
str NAME = 'GNUe Application'
dict OPTIONS = {}
str REPORT_BUGS_TO = 'Please report any bugs to info@gnue.or...
str SUMMARY = 'A brief summary of the program goes here.'
str USAGE = '[options]'
int USE_CONNECTIONS = 1                                                                     
int USE_DATABASE_OPTIONS = 0                                                                     
int USE_RPC_OPTIONS = 0                                                                     
str VERSION = '0.0.0'

Method Details

__init__(self, connections=None, application=None, defaults=None)
(Constructor)

Parameters:
connections -
application -
defaults -
Overrides:
gnue.common.apps.GBaseApp.GBaseApp.__init__ (inherited documentation)

daemonize(self)

Turn ourselves into a daemon/service/etc.
Returns:
1 if the program successfully converted, 0 otherwise

run(self)

This can be overwritten by code necessary for startup. If overwritten, do not first call the original GServerApp.run(self) as this would send to background immediately. Instead, call the original GServerApp.run(self) after you are sure you are finished with startup code and are ready to go to server mode.
Overrides:
gnue.common.apps.GBaseApp.GBaseApp.run

shutdown(self)

Called when a request to shutdown the server is received


GNUe Home

Public API

Developer's Corner