Package twisted :: Package words :: Module tendril :: Class TendrilFactory |
[frames | no frames]

## Class TendrilFactory

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

Instance Variable Summary
Inherited from ReconnectingClientFactory
`float` | `factor`: a multiplicitive factor by which the delay grows
`float` | `initialDelay`: Delay for the first reconnection attempt.
`float` | `jitter`: percentage of randomness to introduce into the delay length to prevent stampeding.
`int` | `maxDelay`: Maximum number of seconds between connection attempts.

Class Variable Summary
`str` | `_errorGroup` = `'TendrilErrors'`
`list` | `_groupList` = `['tendril_test']`
`tuple` | `helptext` = `("Hi, I'm a Tendril bridge between here and %...`
`NoneType` | `networkSuffix` = None
`NoneType` | `nickname` = None
`NoneType` | `perspectiveName` = None
`class` | `protocol` = `twisted.words.tendril.TendrilIRC`
`NoneType` | `wordsclient` = None
`NoneType` | `wordsService` = None
Inherited from ReconnectingClientFactory
`NoneType` | `_callID` = None
`NoneType` | `connector` = None
`int` | `continueTrying` = 1
`float` | `delay` = 1.0
`NoneType` | `maxRetries` = None
`int` | `retries` = 0
Inherited from Factory
`tuple` | `__implements__` = `(<class twisted.internet.interfaces.IPr...`
`str` | `noisy` = `'sure, why not'`
`int` | `numPorts` = 0

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

    ### _errorGroup Type: `str` Value:
        'TendrilErrors'

    ### _groupList Type: `list` Value:
        ['tendril_test']

    ### 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

    ### wordsclient Type: `NoneType` Value:
        None

    ### wordsService Type: `NoneType` Value:
        None

Generated by Epydoc 2.0 on Sat Oct 25 00:54:56 2003 | http://epydoc.sf.net