Package g4ds :: Module communicationmanager_db :: Class CommDB
[show private | hide private]
[frames | no frames]

Class CommDB


Handles all requests form the communication module for backend connectivity with database.
Method Summary
  __init__(self)
Initialises the database manager for communication.
  addEndpoint(self, endpoint)
Adds one endpoint to the endpoint table in the database.
  addProtocol(self, protocol)
Adds one protocol to the protocol table in the database.
  findEndpoint(self, memberid, communityid, protocolname, algorithmname)
There is a problem to find the correct endpoint instance for incoming message.
List of communicationmanager.Endpoint getEndpoints(self)
Provides a list of all endpoints in the database.
List of communicationmanager.Protocol getProtocols(self)
Provides a list of all protocols in the database.
  removeEndpoints(self, endpointid)
Removes credentials from the database.
  shutdown(self)
Closes open database connections.

Method Details

__init__(self)
(Constructor)

Initialises the database manager for communication.

The database connection is established using the appropriate settings in the configuations file / module config.py.

Please run shutdown before you shutdown the application in order to clear the database connections.

addEndpoint(self, endpoint)

Adds one endpoint to the endpoint table in the database.
Parameters:
endpoint - Endpoint to add to the repository
           (type=communicationmanager.Endpoint)

addProtocol(self, protocol)

Adds one protocol to the protocol table in the database.
Parameters:
protocol - Protocol to add to the repository
           (type=communicationmanager.Protocol)

findEndpoint(self, memberid, communityid, protocolname, algorithmname)

There is a problem to find the correct endpoint instance for incoming message.

This structure solves this problem. All the known information is put togehter, and voila, we have an endpoint id.

To Do: The table names are hard coded. They must be replaced with the ones given in the config file.

getEndpoints(self)

Provides a list of all endpoints in the database.
Returns:
List of endpoint instances
           (type=List of communicationmanager.Endpoint)

getProtocols(self)

Provides a list of all protocols in the database.
Returns:
List of protocol instances
           (type=List of communicationmanager.Protocol)

removeEndpoints(self, endpointid=None)

Removes credentials from the database.

Depending on which parameters are given. If no parameter is set, all data in the table will be dropped.

shutdown(self)

Closes open database connections.

Generated by Epydoc 2.0 on Sat Oct 22 22:52:47 2005 http://epydoc.sf.net