Package g4ds :: Module protocolcontroller :: Class ProtocolController
[show private | hide private]
[frames | no frames]

Class ProtocolController


Maintains a dictionary with all available protocols.
Method Summary
  __init__(self, positiveList, negativeList, defaultProtocol)
Initialises the Protocol controller.
  __str__(self)
Some basic information about the object
List of String getAvailableProtocols(self)
Returns a list of names of available protocols.
protocols.protocolinterface.ProtocolInterface getOpenProtocol(self, name)
Provides an instance of the protocol with the name requested.
List of String getOpenProtocols(self)
Returns a list of names of protocols, which are currently initialised on this node.
  shutdownAllListeners(self)

Instance Variable Summary
String _defaultprotocol: Name of the protocol to be used whenever none is defined
Dict of {ProtocolImplementations} _openprotocols: Protocols, which are currently in use; hence, which ones are listening
Dict of {ProtocolImplementationModules} _protocols: Dictionary of protocols implemented and available on this node

Method Details

__init__(self, positiveList=None, negativeList=None, defaultProtocol='soap')
(Constructor)

Initialises the Protocol controller.

The list of protocols is loaded from the config file for protocols.

If positiveList is given, only the protocols defined in there will be used. If not positiveList is given, the negativeList will be checked. Protocols given in there will be skipped when intialising the protocols. If neither of the two lists is given, all protocols defined in the config file for protocols will be initialised and activated.
Parameters:
positiveList - List of names of protocols to initialise
           (type=List of String)
negativeList - List of names of protocols to skip for initialisation
           (type=List of String)
defaultProtocol - Name of protocol to use if none is specified
           (type=String)

__str__(self)
(Informal representation operator)

Some basic information about the object

getAvailableProtocols(self)

Returns a list of names of available protocols.
Returns:
List of names of protocols
           (type=List of String)

getOpenProtocol(self, name)

Provides an instance of the protocol with the name requested.
Returns:
Reference to protocol implementation with the given name
           (type=protocols.protocolinterface.ProtocolInterface)

getOpenProtocols(self)

Returns a list of names of protocols, which are currently initialised on this node.
Returns:
List of names of protocols
           (type=List of String)

Instance Variable Details

_defaultprotocol

Name of the protocol to be used whenever none is defined
Type:
String

_openprotocols

Protocols, which are currently in use; hence, which ones are listening
Type:
Dict of {ProtocolImplementations}

_protocols

Dictionary of protocols implemented and available on this node
Type:
Dict of {ProtocolImplementationModules}

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