Package twisted :: Package words :: Module tendril :: Class TendrilFactory

[show private | hide private]
[frames | no frames]

## Class TendrilFactory

              Factory --+
                        |
            ClientFactory --+
                            |
    ReconnectingClientFactory --+
                                |
             OriginalAccessor --+
                                |
                               TendrilFactory

I build Tendril clients for a words service.

All of a tendril's configurable state is stored here with me.

Method Summary
| ``__init__`(self, service)` Initialize this factory with a words service.
| `__delattr__(self, k)` (inherited from `OriginalAccessor`)
| `__getattr__(self, k)` (inherited from `OriginalAccessor`)
| `__getstate__(self)`
| `__setattr__(self, k, v)` (inherited from `OriginalAccessor`)
| ``buildProtocol`(self, addr)` Create an instance of a subclass of Protocol.
| ``clientConnectionFailed`(self, connector, reason)` Called when a connection has failed. (inherited from `ReconnectingClientFactory`)
| `clientConnectionLost(self, connector, unused_reason)` (inherited from `ReconnectingClientFactory`)
| ``doStart`(self)` Make sure startFactory is called. (inherited from `Factory`)
| ``doStop`(self)` Make sure stopFactory is called. (inherited from `Factory`)
| `get_errorGroup(self)`
| `get_groupList(self)`
| ``reallyDel`(self, k)` *actually* del self.k without incurring side-effects. (inherited from `OriginalAccessor`)
| ``reallySet`(self, k, v)` *actually* set self.k to v without incurring side-effects. (inherited from `OriginalAccessor`)
| ``resetDelay`(self)` Call me after a successful connection to reset. (inherited from `ReconnectingClientFactory`)
| ``retry`(self, connector)` Have this connector connect again, after a suitable delay. (inherited from `ReconnectingClientFactory`)
| `set_errorGroup(self, errorGroup)`
| `set_groupList(self, groupList)`
| `set_helptext(self, helptext)`
| `set_nickname(self, nick)`
| `set_wordsService(self, service)`
| ``startedConnecting`(self, connector)` Called when a connection has been started. (inherited from `ClientFactory`)
| ``startFactory`(self)` This will be called before I begin listening on a Port or Connector.
| ``stopFactory`(self)` This will be called before I stop listening on all Ports/Connectors. (inherited from `Factory`)
| ``stopTrying`(self)` I put a stop to any attempt to reconnect in progress. (inherited from `ReconnectingClientFactory`)

Class Variable Summary
`tuple` | `helptext`
`NoneType` | `networkSuffix`
`NoneType` | `nickname`
`NoneType` | `perspectiveName`
`class` | `TendrilIRC`
`NoneType` | `wordsclient`
`NoneType` | `wordsService`
`str` | `_errorGroup`
`list` | `_groupList`

Method Details

### __init__(self, service)
(Constructor)

Initialize this factory with a words service.

### buildProtocol(self, addr)

Create an instance of a subclass of Protocol.

The returned instance will handle input on an incoming server connection, and an attribute "factory" pointing to the creating factory.

Override this method to alter how Protocol instances get created.

  Overrides:
    `twisted.internet.protocol.Factory.buildProtocol` (inherited documentation)

### startFactory(self)

This will be called before I begin listening on a Port or Connector.

It will only be called once, even if the factory is connected to multiple ports.

This can be used to perform 'unserialization' tasks that are best put off until things are actually running, such as connecting to a database, opening files, etcetera.

  Overrides:
    `twisted.internet.protocol.Factory.startFactory` (inherited documentation)

Class Variable Details

### helptext

  Type:
    `tuple`
  Value:

        ("Hi, I'm a Tendril bridge between here and %(service)s.",
         'You can send a private message to someone like this:',
         '/msg %(myNick)s msg theirNick Hi there!')

### networkSuffix

  Type:
    `NoneType`
  Value:

        None

### nickname

  Type:
    `NoneType`
  Value:

        None

### perspectiveName

  Type:
    `NoneType`
  Value:

        None

### TendrilIRC

`TendrilIRC` = `twisted.words.tendril.TendrilIRC`

### wordsclient

  Type:
    `NoneType`
  Value:

        None

### wordsService

  Type:
    `NoneType`
  Value:

        None

### _errorGroup

  Type:
    `str`
  Value:

        'TendrilErrors'

### _groupList

  Type:
    `list`
  Value:

        ['tendril_test']

Generated by Epydoc 1.1 on Thu May 8 13:19:26 2003 | http://epydoc.sf.net