Home | Trees | Index | Help |
|
---|
Package twisted :: Package spread :: Module pb :: Class Broker |
|
Ephemeral
--+ |BaseProtocol
--+ | | |Protocol
--+ |Pynana
--+ | Broker
Method Summary | |
---|---|
__init__(self,
isClient,
security)
| |
cachedLocallyAs(self,
cid)
| |
Returns an ID that says what this instance is cached as remotely, or None if it's not. | |
(internal) | |
XXX | |
connectionFailed(self)
| |
The connection was lost. | |
Initialize. | |
(internal) Send a DECACHE directive. | |
Remove a callback from list of disconnect callbacks. | |
Evaluate an expression as it's received. | |
Get a local object for a locally unique ID. | |
Generate a new LUID. | |
Generate a new request ID. | |
Call the given callback when the Broker connects. | |
Call the given callback when the Broker disconnects. | |
Call the given callback if the Broker fails to connect. | |
pauseProducing(self)
| |
(internal) Got an answer to a previously sent message. | |
proto_cachemessage(self,
requestID,
objectID,
message,
answerRequired,
netArgs,
netKw)
| |
(internal) Decrement the reference count of a cached object. | |
(internal) Decrement the reference count of an object. | |
Respond to stock ' didNotUnderstand ' message. | |
(internal) Deal with an error. | |
proto_message(self,
requestID,
objectID,
message,
answerRequired,
netArgs,
netKw)
| |
(internal) Tell the client it is now OK to uncache an object. | |
Protocol message: (version version-number) | |
registerPageProducer(self,
pager)
| |
Get an ID for a local object. | |
Returns an object from the remote name mapping. | |
Returns an instance which is cached remotely, with this LUID. | |
Called when the consumer attached to me runs out of buffer. | |
Utility method to send an expression to the other side of the connection. | |
(internal) Send a DECREF directive. | |
Jelly an object according to the remote security rules for this broker. | |
Store a special (string) ID for this object. | |
stopProducing(self)
| |
Unjelly an sexp according to the local security rules for this broker. | |
Inherited from Pynana | |
| |
Called when a connection is made. | |
| |
| |
| |
Inherited from Ephemeral | |
| |
|
Class Variable Summary | |
---|---|
NoneType |
factory = None |
int |
maxBrokerRefsViolations = 0 |
NoneType |
username = None |
int |
version = 6 |
NoneType |
waitingForAnswers = None |
Inherited from Pynana | |
str |
buffer = ''
|
dict |
incomingVocabulary = {1: 'None', 2: 'class', 3: 'derefer...
|
str |
k = 'lcache'
|
list |
knownDialects = ['pb', 'none']
|
dict |
outgoingVocabulary = {'reference': 4, 'uncache': 31, 'mo...
|
int |
v = 18 |
Inherited from Protocol | |
Implements |
__implemented__ = <implementedBy twisted.internet.protoc...
|
ClassProvides |
__provides__ = <zope.interface.declarations.ClassProvide...
|
Method Details |
---|
cachedRemotelyAs(self, instance, incref=0)Returns an ID that says what this instance is cached as remotely, orNone if it's not.
|
cacheLocally(self, cid, instance)(internal) Store a non-filled-out cached instance locally. |
cacheRemotely(self, instance)XXX |
connectionLost(self, reason)The connection was lost. |
connectionReady(self)Initialize. Called after Banana negotiation is done.
|
decCacheRef(self, objectID)(internal) Send a DECACHE directive. |
dontNotifyOnDisconnect(self, notifier)Remove a callback from list of disconnect callbacks. |
expressionReceived(self, sexp)Evaluate an expression as it's received. |
localObjectForID(self, luid)Get a local object for a locally unique ID. I will return an object previously stored with self.registerReference , or None
if XXX:Unfinished thought:XXX
|
newLocalID(self)Generate a new LUID. |
newRequestID(self)Generate a new request ID. |
notifyOnConnect(self, notifier)Call the given callback when the Broker connects. |
notifyOnDisconnect(self, notifier)Call the given callback when the Broker disconnects. |
notifyOnFail(self, notifier)Call the given callback if the Broker fails to connect. |
proto_answer(self, requestID, netResult)(internal) Got an answer to a previously sent message. Look up the appropriate callback and call it. |
proto_decache(self, objectID)(internal) Decrement the reference count of a cached object. If the reference count is zero, free the reference, then send an 'uncached' directive. |
proto_decref(self, objectID)(internal) Decrement the reference count of an object. If the reference count is zero, it will free the reference to this object. |
proto_didNotUnderstand(self, command)Respond to stock ' |
proto_error(self, requestID, fail)(internal) Deal with an error. |
proto_uncache(self, objectID)(internal) Tell the client it is now OK to uncache an object. |
proto_version(self, vnum)Protocol message: (version version-number) Check to make sure that both ends of the protocol are speaking the same version dialect. |
registerReference(self, object)Get an ID for a local object. Store a persistent reference to a local object and map its id() to a generated, session-unique ID and return that ID. |
remoteForName(self, name)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. |
remotelyCachedForLUID(self, luid)Returns an instance which is cached remotely, with this LUID. |
resumeProducing(self)Called when the consumer attached to me runs out of buffer. |
sendCall(self, *exp)Utility method to send an expression to the other side of the connection. |
sendDecRef(self, objectID)(internal) Send a DECREF directive. |
serialize(self, object, perspective=None, method=None, args=None, kw=None)Jelly an object according to the remote security rules for this broker. |
setNameForLocal(self, name, object)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. |
unserialize(self, sexp, perspective=None)Unjelly an sexp according to the local security rules for this broker. |
Class Variable Details |
---|
factory
|
maxBrokerRefsViolations
|
username
|
version
|
waitingForAnswers
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Sun Dec 10 22:04:44 2006 | http://epydoc.sf.net |