Package g4ds :: Module messagehandler :: Class GlobalDispatcher
[show private | hide private]
[frames | no frames]

Class GlobalDispatcher


First instance for dispatching messages.

Checks, whether a messae is a G4DS control message or an application message. If G4DS control message, it will be passed on to the ControlMessageDispatcher, in the latter case passed to the serviceintegrator.
Method Summary
  __init__(self)
Yet empty Constructor.
  dispatch(self, protocol, message, inbackground)
Receives the raw messages from the protocol implementations and passes them somewhere depending on the type.
String _handleDecryptionAndValidation(self, message, protocolname)
Helper function for supporting the decryption of the message.

Method Details

__init__(self)
(Constructor)

Yet empty Constructor.

dispatch(self, protocol, message, inbackground=1)

Receives the raw messages from the protocol implementations and passes them somewhere depending on the type.

Message is passed to the messagewrapper.MessageWrapper.unwrapG4dsMessage function for removing the g4ds-"header" and gain the actual information. Afterwards, in case of an encrypted message it is passed to the private function _handleDecryptionAndValidation which will thereupon unwrap and decrypt the message. Then, the message is passed and it is identified, whether there is a service or a control message contained. Depending on this, the content is either passed to the g4dsconfigurationcontroller.ControlMessageDispatcher.dispatch or to the serviceintegrator.ServiceIntegrator.dispatch.
Parameters:
protocol - Protocol as identified for the incoming message
           (type=String)
message - String representation of the XML message
           (type=String)

_handleDecryptionAndValidation(self, message, protocolname)

Helper function for supporting the decryption of the message.

The passed message is passed to the messagewrapper.MessageWrapper.unwrapForDecryption for removing the encryption "header" and gaining the name of the algorithm and the cipher text. Afterwards, the function decrypt in the securitycontroller is invoked and the result is returned.
Returns:
Result of the securitycontroller.SecurityController.decrypt
           (type=String)

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