Package twisted :: Package spread :: Module pb

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

## Module twisted.spread.pb

Classes
`AsReferenceable` | AsReferenceable: a reference directed towards another object.
`AuthChallenger` | XXX
`AuthRoot` | I provide AuthServs as root objects to Brokers for a BrokerFactory.
`AuthServ` | XXX
`Broker` | I am a broker for objects.
`BrokerClientFactory` |
`BrokerFactory` | I am a server for object brokerage.
`CopiedFailure` |
`CopyableFailure` | A `flavors.RemoteCopy` and `flavors.Copyable` version of `twisted.python.failure.Failure`for serialization.
`IdentityConnector` | I support connecting to multiple Perspective Broker services that are in a service tree.
`IdentityWrapper` | I delegate most functionality to a `twisted.cred.identity.Identity`.
`Local` | (internal) A reference to a local object.
`Perspective` | A perspective on a service.
`RemoteMethod` | This is a translucent reference to a remote message.
`RemoteReference` | This is a translucent reference to a remote object.
`Service` | A service for Perspective Broker.

Exceptions
`DeadReferenceError` | This error is raised when a method is called on a dead reference (one whose broker has been disconnected).
`Error` | This error can be raised to generate known error conditions.
`PBConnectionLost` |
`ProtocolError` | This error is raised when an invalid protocol statement is received.

Function Summary
| ``authIdentity`(authServRef, username, password)` Return a Deferred which will do the challenge-response dance and return a remote Identity reference.
| ``connect`(host, port, username, password, serviceName, perspectiveName, client, timeout)` Connects and authenticates, then retrieves a PB service.
| `failure2Copyable(fail)`
| ``getObjectAt`(host, port, timeout)` Establishes a PB connection and returns with a `RemoteReference`.
| ``getObjectAtSSL`(host, port, timeout)` Establishes a PB connection over SSL and returns with a RemoteReference.
| ``getObjectRetriever`()` Get a factory which retreives a root object from its client
| ``logIn`(authServRef, client, service, username, password, perspectiveName)` I return a Deferred which will be called back with a Perspective.
| ``noOperation`(*args, **kw)` Do nothing.
| ``printTraceback`(tb)` Print a traceback (string) to the standard log.

Variable Summary
`string` | `__version__`
`dictionary` | `copyTags`
`SecurityOptions` | `globalSecurity`
`int` | `MAX_BROKER_REFS`
`_Feature` | `nested_scopes`
`int` | `portno`
`SelectReactor` | `reactor`

Function Details

### authIdentity(authServRef, username, password)

Return a Deferred which will do the challenge-response dance and return a remote Identity reference.

### connect(host, port, username, password, serviceName, perspectiveName=None, client=None, timeout=None)

Connects and authenticates, then retrieves a PB service.

Required arguments:

- host -- the host the service is running on
- port -- the port on the host to connect to
- username -- the name you will be identified as to the authorizer
- password -- the password for this username
- serviceName -- name of the service to request

Optional (keyword) arguments:

- perspectiveName -- the name of the perspective to request, if different than the username
- client -- XXX the "reference" argument to perspective.Perspective.attached
- timeout -- see twisted.internet.tcp.Client

  Returns:
    A Deferred instance that gets a callback when the final Perspective is connected, and an errback when an error occurs at any stage of connecting.

### getObjectAt(host, port, timeout=None)

Establishes a PB connection and returns with a `RemoteReference`.

  Parameters:
    `host` - the host to connect to
    `port` - the port number to connect to
    `timeout` - a value in milliseconds to wait before failing by default. (OPTIONAL)
  Returns:
    A Deferred which will be passed a remote reference to the root object of a PB server.x

### getObjectAtSSL(host, port, timeout=None)

Establishes a PB connection over SSL and returns with a RemoteReference.

  Parameters:
    `host` - the host to connect to
    `port` - the port number to connect to
    `timeout` - a value in milliseconds to wait before failing by default. (OPTIONAL)
  Returns:
    A Deferred which will be passed a remote reference to the root object of a PB server.x

### getObjectRetriever()

Get a factory which retreives a root object from its client

  Returns:
    A pair: A ClientFactory and a Deferred which will be passed a remote reference to the root object of a PB server.x

### logIn(authServRef, client, service, username, password, perspectiveName=None)

I return a Deferred which will be called back with a Perspective.

### noOperation(*args, **kw)

Do nothing.

Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit...

### printTraceback(tb)

Print a traceback (string) to the standard log.

Variable Details

### __version__

  Type:
    `string`
  Value:

        '1.118'

### copyTags

  Type:
    `dictionary`
  Value:

        {'cached': <function unjellyCached at 0x8228c4c>,
         'lcache': <function unjellyLCache at 0x8239a34>,
         'local': <function unjellyLocal at 0x8239a6c>,
         'remote': <class twisted.spread.pb.RemoteReference at 0x843b3c4>,
         'twisted.spread.pb.CopyableFailure': <class twisted.spread.pb.CopiedF\
        ailure at 0x83acabc>,
         'twisted.web.server.Request': <class twisted.web.distrib.Request at 0\
        x89212cc>}

### globalSecurity

  Type:
    `SecurityOptions`
  Value:

        <twisted.spread.jelly.SecurityOptions instance at 0x82dcf74>

### MAX_BROKER_REFS

  Type:
    `int`
  Value:

        1024

### nested_scopes

  Type:
    `_Feature`
  Value:

        Feature((2, 1, 0, 'beta', 1), (2, 2, 0, 'final', 0))

### portno

  Type:
    `int`
  Value:

        8787

### reactor

  Type:
    `SelectReactor`
  Value:

        <twisted.internet.default.SelectReactor instance at 0x834759c>

Generated by Epydoc 1.1 on Sat Feb 15 21:18:12 2003 | http://epydoc.sf.net