Package svs_core :: Package network :: Module clustergroups :: Class ClusterGroup
[show private | hide private]
[frames | no frames]

Class ClusterGroup

       Listenable --+
                    |
Jellyable --+       |
            |       |
 Serializable --+   |
                |   |
         Viewable --+
                    |
                   ClusterGroup


This class encapsulates a single group of client proxy objects. It adds and removes proxies from the group as well as handling any collective communication to group members.
Method Summary
  __init__(self, groupname)
  addClient(self, client)
Adds client to group.
  notifyListeners(self, listenerGroup, dataPacket)
Forwards data packet to specified list of clients.
  removeClient(self, client)
Removes client from group.
  sendData(self, dataPacket)
Forwards dataPacket to all clients in group.
  sendDataResult(self, cmdResult)
Forwards data from avatar to clients in group.
  update(self, simTime)
Forwards update message from simulation cluster to clients in group.
  view_getClientList(self, sendingClient)
Returns a list of clients currently in group.
  view_getData(self, sendingClient, dataRequest)
Retrieves data from specified source (other client in cluster).
  view_getProfileForClient(self, sendingClient, requestedClient)
Retrieves profile from specified client.
  view_handleListenRequest(self, sendingClient, listenRequest)
Forwards request from one client to become the listener of another.
  view_handleListenRequestForProcess(self, sendingClient, listenRequest)
Forwards request from client to listen for network processes.
  view_sendChatMessage(self, from_client, msgPacket)
Forwards a message from a client to the group.
  view_sendCommand(self, sendingClient, cmd)
Sends command to client in group.
  view_sendCommandResult(self, sendingClient, cmdResult)
Sends command to client in group.
  view_sendData(self, sendingClient, dataPacket)
Retrieves data from specified source (other client in cluster).
  view_sendDataResult(self, sendingClient, cmdResult)
Forwards data from client to other client in group.
    Inherited from Viewable
  jellyFor(self, jellier)
Serialize a ViewPoint for me and the perspective of the given broker.
    Inherited from Serializable
  processUniqueID(self)
Return an ID which uniquely represents this object for this process.
    Inherited from Jellyable
  getStateFor(self, jellier)
    Inherited from Listenable
  addListener(self, listener, listenFor)
Adds new listener to avatar.
  handleListenRequest(self, listenRequest)
Deals with listen request from another client.
  removeListener(self, listener, listenFor)
Removes listener from avatar.

Class Variable Summary
    Inherited from Serializable
Implements __implemented__ = <implementedBy twisted.spread.flavors....
_implementsTuple __implements__ = (<MetaInterface twisted.spread.interfac...
ClassProvides __provides__ = <zope.interface.declarations.ClassProvide...
    Inherited from Jellyable
ClassProvides __providedBy__ = <zope.interface.declarations.ClassProvi...

Method Details

addClient(self, client)

Adds client to group.
Parameters:
client - new client to be added
           (type=object)

notifyListeners(self, listenerGroup, dataPacket)

Forwards data packet to specified list of clients.
Overrides:
svs_core.utilities.notification.Listenable.notifyListeners

removeClient(self, client)

Removes client from group.
Parameters:
client - old client to be removed
           (type=object)

sendData(self, dataPacket)

Forwards dataPacket to all clients in group.

sendDataResult(self, cmdResult)

Forwards data from avatar to clients in group.
Parameters:
cmdResult - result of retrieval
           (type=CommandResult)

update(self, simTime)

Forwards update message from simulation cluster to clients in group.
Parameters:
simTime - current simulation time
           (type=list)

view_getClientList(self, sendingClient)

Returns a list of clients currently in group.

view_getData(self, sendingClient, dataRequest)

Retrieves data from specified source (other client in cluster).

view_getProfileForClient(self, sendingClient, requestedClient)

Retrieves profile from specified client.

view_handleListenRequest(self, sendingClient, listenRequest)

Forwards request from one client to become the listener of another.

view_handleListenRequestForProcess(self, sendingClient, listenRequest)

Forwards request from client to listen for network processes.

view_sendChatMessage(self, from_client, msgPacket)

Forwards a message from a client to the group.

If a client has registered as a 'process listener' (see ClusterGroup.view_handleListenRequestForProcess) for chat messages, the message is also sent onto them.
Parameters:
from_client - client sending message
           (type=object)

view_sendCommand(self, sendingClient, cmd)

Sends command to client in group.

view_sendCommandResult(self, sendingClient, cmdResult)

Sends command to client in group.

view_sendData(self, sendingClient, dataPacket)

Retrieves data from specified source (other client in cluster).

view_sendDataResult(self, sendingClient, cmdResult)

Forwards data from client to other client in group.
Parameters:
cmdResult - result of retrieval
           (type=CommandResult)

Generated by Epydoc 2.1 on Thu Oct 20 15:30:28 2005 http://epydoc.sf.net