class documentation

class twisted.words.service.Group: (source)

Implements interfaces: twisted.words.iwords.IGroup

View In Hierarchy

Undocumented

Method __init__ Undocumented
Instance Variable name A short string, unique among groups.
Instance Variable users Undocumented
Instance Variable meta Undocumented
Method add Include the given user in this group.
Method remove Remove the given user from this group.
Method size Return the number of participants in this group.
Method receive Broadcast the given message from the given sender to other users in group.
Method setMetadata Change the metadata associated with this group.
Method iterusers Return an iterator of all users in this group.
Method _ebUserCall Undocumented
Method _cbUserCall Undocumented
def __init__(self, name): (source)

Undocumented

name = (source)

A short string, unique among groups.

users = (source)

Undocumented

(type: dict)
meta = (source)

Undocumented

def _ebUserCall(self, err, p): (source)

Undocumented

def _cbUserCall(self, results): (source)

Undocumented

def add(self, user): (source)

Include the given user in this group.

ParametersuserUndocumented (type: IUser)
def remove(self, user, reason=None): (source)

Remove the given user from this group.

ParametersuserUndocumented (type: IUser)
reasonUndocumented (type: unicode)
def size(self): (source)

Return the number of participants in this group.

ReturnsA Deferred which fires with an int representing the number of participants in this group. (type: twisted.internet.defer.Deferred)
def receive(self, sender, recipient, message): (source)

Broadcast the given message from the given sender to other users in group.

The message is not re-transmitted to the sender.

ParameterssenderIUser
recipientThis is probably a wart. Maybe it will be removed in the future. For now, it should be the group object the message is being delivered to. (type: IGroup)
messagedict
ReturnsA Deferred which fires with None when delivery has been attempted for all users. (type: twisted.internet.defer.Deferred)
def setMetadata(self, meta): (source)

Change the metadata associated with this group.

ParametersmetaUndocumented (type: dict)
def iterusers(self): (source)

Return an iterator of all users in this group.

API Documentation for Twisted, generated by pydoctor 20.12.1 at 2021-02-28 19:53:36.