Package g4ds :: Module g4dsconfigurationcontroller :: Class MemberController
[show private | hide private]
[frames | no frames]

Class MemberController


Handles controlling of members.
Method Summary
  __init__(self)
Yet empty Constructor.
  dispatch(self, node, message, incomingmessageid)
Handles incoming messages.
  processUpdateMdl(self, memberid, distribute, ackrequested, data, messageid, timeout)
Processes a request for applying a new version of a member description.
  replyToRequestMemberDescription(self, memberid, messageid)
Looks for the requested member description and replies appropriately.
String requestMemberDescription(self, memberid, destinationMemberId)
Requests the member description for memberid from destinationMemberId.
  requestPushMdl(self, destination, memberid, distribute, mdl, ackrequested)
Push the member description to the given member.
String sendMemberControllerMessage(self, destination, action, args, data, messagereference, sucess)
Any member message should be send through this interface.
List of String / List of String uploadMdlToMembers(self, memberid, mdl, communityid, destinations, timeout, distribute)
Uploads a mdl to a collection of members.
  _subUploadOne(self, memberid, mdl, communityid, destination, distribute, inbackground, status)

Method Details

__init__(self)
(Constructor)

Yet empty Constructor.

dispatch(self, node, message, incomingmessageid)

Handles incoming messages.
Parameters:
node - Data of the message as DOM tree
           (type=xml.dom.Node)
message - XML Message in String representation
           (type=String)

processUpdateMdl(self, memberid, distribute, ackrequested, data, messageid, timeout=120)

Processes a request for applying a new version of a member description.

replyToRequestMemberDescription(self, memberid, messageid)

Looks for the requested member description and replies appropriately.

requestMemberDescription(self, memberid, destinationMemberId)

Requests the member description for memberid from destinationMemberId.

Note: Is does not wait for the reply. You have to register yourself with the JobScheduler in order to await the reply to the message!
Returns:
The ID of the message
           (type=String)

requestPushMdl(self, destination, memberid, distribute, mdl, ackrequested=0)

Push the member description to the given member.

From the outside use uploadMdlToMembers instead - it's waiting for replies and so on.

sendMemberControllerMessage(self, destination, action, args, data=None, messagereference=None, sucess='0')

Any member message should be send through this interface.
Parameters:
action - Action to perform - check constants in this module
           (type=String)
args - Arguments to pass in form of dictionary - name | value
           (type=dict)
data - Any additional data which does not fit into the args
           (type=String)
Returns:
The ID of the message
           (type=String)

uploadMdlToMembers(self, memberid, mdl, communityid=None, destinations=[], timeout=60, distribute=0)

Uploads a mdl to a collection of members.

Supports some job features - chcking for replies...
Parameters:
memberid - ID of the member described in the mdl
           (type=String)
mdl - Description in xml format
           (type=String)
communityid - ID of the community to use for this transaction - None for any
           (type=String)
destinations - List of IDs for members to upload to
           (type=List of String)
timeout - Time to wait for EACH transaction to finish.
           (type=int)
Returns:
List of sucessful member ids and list of unsucessful member ids
           (type=List of String / List of String)

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