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

Class ServiceController


Handles controlling of services.
Method Summary
  __init__(self)
Yet empty Constructor.
  dispatch(self, node, message, incomingmessageid)
Handles incoming services control messages.
  downloadServiceDescriptionJob(self, serviceid, memberid, inbackground, status)
Job function for downloading a ksdl from a remote host.
  replyToRequestMemberList(self, serviceid, messageid)
Looks for the members of the requested service - if available and allowed, a list of member ids is sent.
  replyToRequestMemberSubscription(self, newmemberid, serviceid, messageid)
Generates the reply to requestMemberSubscription.
  replyToRequestServiceDescription(self, serviceid, messageid)
Looks for the requested service description and replies appropriately.
  replyToUploadKsdlToMember(self, serviceid, ackrequested, data, messageid, timeout)
Processes a request for applying a new version of a service description.
String requestMemberList(self, serviceid, destinationMemberId)
Requests a list of members subscriped to the service with the given service id.
  requestMemberSubscription(self, serviceid, newmemberid, destinationmemberid)
Send a message to a service authority in order to subscribe to a service.
  requestPushKsdl(self, destination, serviceid, ksdl, ackrequested)
Push service description to given member.
String requestServiceDescription(self, serviceid, destinationMemberId)
Requests the community description for serviceid from destinationMemberId.
  requestSubscriptionJob(self, serviceid, newmemberid, destination, secs)
Supporter function for member subscription process.
String sendServiceControllerMessage(self, destination, action, args, data, messagereference, sucess)
Any service control message should be send through this interface.
  uploadKsdlToMember(self, serviceid, ksdl, destination, communityid, inbackground, status)
  uploadKsdlToMemberJob(self, serviceid, ksdl, destination, community, timeout)
Uploads the service description to the given member.
  _requestSubscriptionThread(self, serviceid, memberid, destination, inbackground, status)
Supporter function for subsribing a member to a service.

Method Details

__init__(self)
(Constructor)

Yet empty Constructor.

dispatch(self, node, message, incomingmessageid)

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

downloadServiceDescriptionJob(self, serviceid, memberid, inbackground=0, status=None)

Job function for downloading a ksdl from a remote host.

Supports job functionality.

replyToRequestMemberList(self, serviceid, messageid)

Looks for the members of the requested service - if available and allowed, a list of member ids is sent.
Parameters:
serviceid - ID of the service the member list was requested for
           (type=String)
messageid - ID of the incoming message
           (type=String)

replyToRequestMemberSubscription(self, newmemberid, serviceid, messageid)

Generates the reply to requestMemberSubscription.

replyToRequestServiceDescription(self, serviceid, messageid)

Looks for the requested service description and replies appropriately.
Parameters:
serviceid - ID of the service the description was requested for
           (type=String)
messageid - ID of the incoming message
           (type=String)

replyToUploadKsdlToMember(self, serviceid, ackrequested, data, messageid, timeout=120)

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

requestMemberList(self, serviceid, destinationMemberId)

Requests a list of members subscriped to the service with the given service id.
Parameters:
serviceid - ID of the service, the list of members shall be requested for
           (type=String)
destinationMemberId - ID of the member the list shall be requested from
           (type=String)
Returns:
ID of the sent message
           (type=String)

requestMemberSubscription(self, serviceid, newmemberid, destinationmemberid)

Send a message to a service authority in order to subscribe to a service.

requestPushKsdl(self, destination, serviceid, ksdl, ackrequested=0)

Push service description to given member.

requestServiceDescription(self, serviceid, destinationMemberId)

Requests the community description for serviceid 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!
Parameters:
serviceid - ID of the service, the description shall be downloaded for
           (type=String)
destinationMemberId - ID of the member, the description shall be requested from
           (type=String)
Returns:
The ID of the message
           (type=String)

requestSubscriptionJob(self, serviceid, newmemberid, destination, secs)

Supporter function for member subscription process.

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

Any service control 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)

uploadKsdlToMemberJob(self, serviceid, ksdl, destination, community=None, timeout=60)

Uploads the service description to the given member.

Function supports job functionality.

_requestSubscriptionThread(self, serviceid, memberid, destination, inbackground=0, status=None)

Supporter function for subsribing a member to a service.

Supports job functionality.

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