Package foolscap :: Module referenceable :: Class SturdyRef
[hide private]
[frames] | no frames]

Class SturdyRef

source code

                  object --+    
                           |    
           copyable.Copyable --+
                               |
copyable._RemoteCopyBase --+   |
                           |   |
                  object --+   |
                           |   |
         copyable.RemoteCopy --+
                               |
                              SturdyRef

I am a pointer to a Referenceable that lives in some (probably remote) Tub. This pointer is long-lived, however you cannot send messages with it directly. To use it, you must ask your Tub to turn it into a RemoteReference with tub.getReference(sturdyref).

The SturdyRef is associated with a URL: you can create a SturdyRef out of a URL that you obtain from some other source, and you can ask the SturdyRef for its URL.

SturdyRefs are serialized by copying their URL, and create an identical SturdyRef on the receiving side.

Nested Classes [hide private]

Inherited from copyable.RemoteCopy: __metaclass__

Instance Methods [hide private]
 
__init__(self, url=None)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
_init_from_url(self, url) source code
 
getTubRef(self) source code
 
_encode_location_hints(self) source code
 
getURL(self) source code
 
__str__(self)
str(x)
source code
 
_distinguishers(self)
Two SturdyRefs are equivalent if they point to the same object.
source code
 
__hash__(self)
hash(x)
source code
 
__cmp__(self, them) source code

Inherited from copyable.Copyable: __providedBy__, getStateToCopy, getTypeToCopy

Inherited from copyable._RemoteCopyBase: setCopyableState

Inherited from object: __delattr__, __getattribute__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__

Class Variables [hide private]
  copytype = 'foolscap.SturdyRef'
  typeToCopy = 'foolscap.SturdyRef'
  encrypted = False
  tubID = None
  name = None
  __implemented__ = <implementedBy foolscap.referenceable.Sturdy...
  __provides__ = <zope.interface.declarations.ClassProvides obje...

Inherited from copyable._RemoteCopyBase: nonCyclic, stateSchema

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, url=None)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

__str__(self)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)

_distinguishers(self)

source code 

Two SturdyRefs are equivalent if they point to the same object. SturdyRefs to encrypted Tubs only pay attention to the TubID and the reference name. SturdyRefs to unauthenticated Tubs must use the location hints instead of the (missing) TubID. This method makes it easier to compare a pair of SturdyRefs.

__hash__(self)
(Hashing function)

source code 

hash(x)

Overrides: object.__hash__
(inherited documentation)

Class Variable Details [hide private]

__implemented__

Value:
<implementedBy foolscap.referenceable.SturdyRef>

__provides__

Value:
<zope.interface.declarations.ClassProvides object at 0x871914c>