class Broker(banana.Banana): (source)
Known subclasses: twisted.mail.pb.MaildirBroker, twisted.mail.pb.MaildirClient
Constructor: Broker(isClient, security)
I am a broker for objects.
| Method | __init__ |
Undocumented |
| Method | cached |
Undocumented |
| Method | cached |
No summary |
| Method | cache |
(internal) |
| Method | cache |
XXX |
| Method | connection |
Undocumented |
| Method | connection |
The connection was lost. |
| Method | connection |
Initialize. Called after Banana negotiation is done. |
| Method | dec |
(internal) Send a DECACHE directive. |
| Method | dont |
No summary |
| Method | expression |
Evaluate an expression as it's received. |
| Method | local |
Get a local object for a locally unique ID. |
| Method | new |
No summary |
| Method | new |
No summary |
| Method | notify |
No summary |
| Method | notify |
No summary |
| Method | notify |
No summary |
| Method | pause |
Undocumented |
| Method | proto |
(internal) Got an answer to a previously sent message. |
| Method | proto |
Undocumented |
| Method | proto |
(internal) Decrement the reference count of a cached object. |
| Method | proto |
(internal) Decrement the reference count of an object. |
| Method | proto_did |
Respond to stock 'didNotUnderstand' message. |
| Method | proto |
(internal) Deal with an error. |
| Method | proto |
Undocumented |
| Method | proto |
(internal) Tell the client it is now OK to uncache an object. |
| Method | proto |
Protocol message: (version version-number) |
| Method | register |
Undocumented |
| Method | register |
Store a persistent reference to a local object and map its id() to a generated, session-unique ID. |
| Method | remote |
Returns an object from the remote name mapping. |
| Method | remotely |
No summary |
| Method | resume |
Called when the consumer attached to me runs out of buffer. |
| Method | send |
Utility method to send an expression to the other side of the connection. |
| Method | send |
(internal) Send a DECREF directive. |
| Method | serialize |
Jelly an object according to the remote security rules for this broker. |
| Method | set |
Store a special (string) ID for this object. |
| Method | stop |
Undocumented |
| Method | unserialize |
Unjelly an sexp according to the local security rules for this broker. |
| Class Variable | factory |
Undocumented |
| Class Variable | username |
Undocumented |
| Class Variable | version |
Undocumented |
| Instance Variable | connects |
Undocumented |
| Instance Variable | current |
Undocumented |
| Instance Variable | current |
Undocumented |
| Instance Variable | disconnected |
Undocumented |
| Instance Variable | disconnects |
Undocumented |
| Instance Variable | failures |
Undocumented |
| Instance Variable | jelly |
Undocumented |
| Instance Variable | jelly |
Undocumented |
| Instance Variable | jelly |
Undocumented |
| Instance Variable | locally |
Undocumented |
| Instance Variable | local |
Undocumented |
| Instance Variable | local |
Undocumented |
| Instance Variable | luids |
Undocumented |
| Instance Variable | max |
Undocumented |
| Instance Variable | page |
Undocumented |
| Instance Variable | remotely |
Undocumented |
| Instance Variable | remotely |
Undocumented |
| Instance Variable | remote |
Undocumented |
| Instance Variable | security |
Undocumented |
| Instance Variable | serializing |
Undocumented |
| Instance Variable | unserializing |
Undocumented |
| Instance Variable | waiting |
Undocumented |
| Method | _recv |
Received a message-send. |
| Method | _send |
(internal) Send an answer to a previously sent message. |
| Method | _send |
(internal) Send an error for a previously sent message. |
| Method | _send |
Log error and then send it. |
| Method | _send |
Call _sendError or _sendFailure, depending on whether fail represents an Error subclass or not. |
| Method | _send |
Undocumented |
| Instance Variable | _local |
Undocumented |
Inherited from Banana:
| Method | call |
Undocumented |
| Method | connection |
Called when a connection is made. |
| Method | data |
Called whenever data is received. |
| Method | got |
Undocumented |
| Method | send |
Send the encoded representation of the given object: |
| Method | set |
Set the prefix limit for decoding done by this protocol instance. |
| Class Variable | incoming |
Undocumented |
| Class Variable | outgoing |
Undocumented |
| Instance Variable | buffer |
Undocumented |
| Instance Variable | current |
Undocumented |
| Instance Variable | is |
Undocumented |
| Instance Variable | known |
These are the profiles supported by this Banana implementation. |
| Instance Variable | list |
Undocumented |
| Instance Variable | outgoing |
Undocumented |
| Instance Variable | outgoing |
Undocumented |
| Instance Variable | prefix |
Undocumented |
| Method | _encode |
Undocumented |
| Method | _select |
Undocumented |
| Instance Variable | _largest |
Undocumented |
| Instance Variable | _largest |
Undocumented |
| Instance Variable | _smallest |
Undocumented |
| Instance Variable | _smallest |
Undocumented |
Inherited from Protocol (via Banana):
| Method | log |
Return a prefix matching the class name, to identify log messages related to this protocol instance. |
Inherited from BaseProtocol (via Banana, Protocol):
| Method | make |
Make a connection to a transport and a server. |
| Instance Variable | connected |
Undocumented |
| Instance Variable | transport |
Undocumented |
Inherited from Ephemeral (via Banana, Protocol, BaseProtocol):
| Method | __getstate__ |
Undocumented |
| Method | __reduce__ |
Serialize any subclass of Ephemeral in a way which replaces it with Ephemeral itself. |
| Method | __setstate__ |
Undocumented |
| Instance Variable | __class__ |
Undocumented |
| Parameters | |
| instance | The instance to look up. |
| incref | Flag to specify whether to increment the reference. |
| Returns | |
An ID that says what this instance is cached as remotely, or None if it's not. |
Get a local object for a locally unique ID.
| Returns | |
An object previously stored with registerReference or None if there is no object which corresponds to the given identifier. |
(internal) Got an answer to a previously sent message.
Look up the appropriate callback and call it.
| Parameters | |
| request | The request ID. |
| net | The answer. |
Undocumented
(internal) Decrement the reference count of a cached object.
If the reference count is zero, free the reference, then send an 'uncached' directive.
| Parameters | |
| object | The object ID. |
(internal) Decrement the reference count of an object.
If the reference count is zero, it will free the reference to this object.
| Parameters | |
| object | The object ID. |
Respond to stock 'didNotUnderstand' message.
Log the command that was not understood and continue. (Note: this will probably be changed to close the connection or raise an exception in the future.)
| Parameters | |
| command | The command to log. |
Protocol message: (version version-number)
Check to make sure that both ends of the protocol are speaking the same version dialect.
| Parameters | |
| vnum | The version number. |
Store a persistent reference to a local object and map its id() to a generated, session-unique ID.
| Parameters | |
| object | a local object |
| Returns | |
| the generated ID |
Returns an object from the remote name mapping.
Note that this does not check the validity of the name, only creates a translucent reference for it.
| Parameters | |
| name | The name to look up. |
| Returns | |
| An object which maps to the name. |
Utility method to send an expression to the other side of the connection.
| Parameters | |
| *exp | The expression. |
Jelly an object according to the remote security rules for this broker.
| Parameters | |
| object | The object to jelly. |
| perspective | The perspective. |
| method | The method. |
| args | Arguments. |
| kw | Keyword arguments. |
Store a special (string) ID for this object.
This is how you specify a 'base' set of objects that the remote protocol can connect to.
| Parameters | |
| name | An ID. |
| object | The object. |
Unjelly an sexp according to the local security rules for this broker.
| Parameters | |
| sexp | The object to unjelly. |
| perspective | The perspective. |
Received a message-send.
Look up message based on object, unserialize the arguments, and invoke it with args, and send an 'answer' or 'error' response.
| Parameters | |
| find | A callable which takes objectID as argument. |
| request | The requiest ID. |
| object | The object ID. |
| message | The message. |
| answer | |
| net | Arguments. |
| net | Keyword arguments. |
(internal) Send an answer to a previously sent message.
| Parameters | |
| net | The answer. |
| request | The request ID. |
(internal) Send an error for a previously sent message.
| Parameters | |
| fail | The failure. |
| request | The request ID. |
Call _sendError or _sendFailure, depending on whether fail represents an Error subclass or not.
| Parameters | |
| fail | The failure. |
| request | The request ID. |